We can now test mount with testmodule.py: remove the test main()
This commit is contained in:
parent
35d2a10177
commit
aef2b7e9e7
@ -17,12 +17,12 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import libcalamares
|
|
||||||
import tempfile
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
import libcalamares
|
||||||
|
|
||||||
def mount( devicePath, mountPoint, fs ):
|
def mount( devicePath, mountPoint, fs ):
|
||||||
if not os.path.exists( mountPoint ):
|
if not os.path.exists( mountPoint ):
|
||||||
@ -52,30 +52,3 @@ def calamares_main():
|
|||||||
mountPartitions( rootMountPoint, libcalamares.global_storage.value( "partitions" ) )
|
mountPartitions( rootMountPoint, libcalamares.global_storage.value( "partitions" ) )
|
||||||
libcalamares.global_storage.insert( "rootMountPoint", rootMountPoint )
|
libcalamares.global_storage.insert( "rootMountPoint", rootMountPoint )
|
||||||
return "all done, mounted at {}".format( rootMountPoint )
|
return "all done, mounted at {}".format( rootMountPoint )
|
||||||
|
|
||||||
|
|
||||||
def main( args ):
|
|
||||||
partitions = (
|
|
||||||
{
|
|
||||||
"device": "/dev/sdb1",
|
|
||||||
"mountPoint": "/",
|
|
||||||
"fs": "ext4",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"device": "/dev/sdb2",
|
|
||||||
"mountPoint": "/home",
|
|
||||||
"fs": "ext4",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"device": "/dev/sdb3",
|
|
||||||
"mountPoint": "",
|
|
||||||
"fs": "linuxswap",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
rootMountPoint = "/tmp/mount"
|
|
||||||
mountPartitions( rootMountPoint, partitions )
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
sys.exit( main( sys.argv ) )
|
|
||||||
|
10
src/modules/mount/test.yaml
Normal file
10
src/modules/mount/test.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
partitions:
|
||||||
|
- device: "/dev/sdb1"
|
||||||
|
mountPoint: "/"
|
||||||
|
fs: "ext4"
|
||||||
|
- device: "/dev/sdb2"
|
||||||
|
mountPoint: "/home"
|
||||||
|
fs: "ext4"
|
||||||
|
- device: "/dev/sdb3"
|
||||||
|
mountPoint: ""
|
||||||
|
fs: "linuxswap"
|
Loading…
Reference in New Issue
Block a user