Skip to content
Snippets Groups Projects
Commit aef2b7e9 authored by Aurélien Gâteau's avatar Aurélien Gâteau
Browse files

We can now test mount with testmodule.py: remove the test main()

parent 35d2a101
No related branches found
No related tags found
No related merge requests found
......@@ -17,12 +17,12 @@
# You should have received a copy of the GNU General Public License
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
import libcalamares
import tempfile
import os
import subprocess
import sys
import tempfile
import libcalamares
def mount( devicePath, mountPoint, fs ):
if not os.path.exists( mountPoint ):
......@@ -52,30 +52,3 @@ def calamares_main():
mountPartitions( rootMountPoint, libcalamares.global_storage.value( "partitions" ) )
libcalamares.global_storage.insert( "rootMountPoint", 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 ) )
partitions:
- device: "/dev/sdb1"
mountPoint: "/"
fs: "ext4"
- device: "/dev/sdb2"
mountPoint: "/home"
fs: "ext4"
- device: "/dev/sdb3"
mountPoint: ""
fs: "linuxswap"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment