File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ def download_file(filename: str, dest: str = None):
271271
272272 log .debug ("Created store path: %s" , req ["store_path" ] / bin_dir )
273273
274- if "filesystem" in req :
274+ if req . get ( "filesystem" ) :
275275 config_path = cache_workdir / ".config"
276276 config = config_path .read_text ()
277277
@@ -293,6 +293,7 @@ def download_file(filename: str, dest: str = None):
293293
294294 config_path .write_text (config )
295295 else :
296+ log .debug ("Enable default filesystems" )
296297 copyfile (
297298 cache_workdir / ".config.orig" ,
298299 cache_workdir / ".config" ,
Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ components:
260260 - ext4
261261 - ubifs
262262 - jffs2
263+ - " "
263264 description : |
264265 Ability to specify filesystem running on device. Attaching this
265266 optional parameter will limit the ImageBuilder to only build
Original file line number Diff line number Diff line change @@ -62,6 +62,26 @@ def test_api_build_filesystem_squashfs(app, upstream):
6262 assert "# CONFIG_TARGET_ROOTFS_EXT4FS is not set" in config
6363 assert "CONFIG_TARGET_ROOTFS_SQUASHFS=y" in config
6464
65+ def test_api_build_filesystem_empty (app , upstream ):
66+ client = app .test_client ()
67+ response = client .post (
68+ "/api/v1/build" ,
69+ json = dict (
70+ version = "TESTVERSION" ,
71+ target = "testtarget/testsubtarget" ,
72+ profile = "testprofile" ,
73+ packages = ["test1" , "test2" ],
74+ filesystem = "" ,
75+ ),
76+ )
77+ assert response .status == "200 OK"
78+ assert response .json .get ("request_hash" ) == "33377fbd91c50c4236343f1dfd67f9ae"
79+ config = (
80+ app .config ["CACHE_PATH" ] / "cache/TESTVERSION/testtarget/testsubtarget/.config"
81+ ).read_text ()
82+ assert "CONFIG_TARGET_ROOTFS_EXT4FS=y" in config
83+ assert "CONFIG_TARGET_ROOTFS_SQUASHFS=y" in config
84+
6585
6686def test_api_build_filesystem_reset (app , upstream ):
6787 client = app .test_client ()
You can’t perform that action at this time.
0 commit comments