@@ -416,14 +416,14 @@ def test_grep(west_init_tmpdir):
416416
417417 assert re .search ('west-commands' , cmd ('grep -- -- -commands' ))
418418
419-
420- def test_update_projects (west_init_tmpdir ):
419+ @ pytest . mark . parametrize ( "options" , [ "" , "-j 1" , "-j 2" , "-j" ])
420+ def test_update_projects (options , west_init_tmpdir ):
421421 # Test the 'west update' command. It calls through to the same backend
422422 # functions that are used for automatic updates and 'west init'
423423 # reinitialization.
424424
425425 # create local repositories
426- cmd ('update' )
426+ cmd ('update ' + options )
427427
428428 # Add commits to the local repos.
429429 ur = update_helper (west_init_tmpdir )
@@ -613,7 +613,8 @@ def test_update_head_0(west_init_tmpdir):
613613 assert modified_files .strip () == "M CODEOWNERS" , \
614614 'local zephyr change not preserved'
615615
616- def test_update_some_with_imports (repos_tmpdir ):
616+ @pytest .mark .parametrize ("options" , ["" , "-j 1" , "-j 2" , "-j -1" ])
617+ def test_update_some_with_imports (options , repos_tmpdir ):
617618 # 'west update project1 project2' should work fine even when
618619 # imports are used, as long as the relevant projects are all
619620 # defined in the manifest repository.
@@ -654,19 +655,19 @@ def test_update_some_with_imports(repos_tmpdir):
654655 # Updating unknown projects should fail as always.
655656
656657 with pytest .raises (subprocess .CalledProcessError ):
657- cmd ('update unknown-project' , cwd = ws )
658+ cmd (f 'update { options } unknown-project' , cwd = ws )
658659
659660 # Updating a list of projects when some are resolved via project
660661 # imports must fail.
661662
662663 with pytest .raises (subprocess .CalledProcessError ):
663- cmd ('update Kconfiglib net-tools' , cwd = ws )
664+ cmd (f 'update { options } Kconfiglib net-tools' , cwd = ws )
664665
665666 # Updates of projects defined in the manifest repository or all
666667 # projects must succeed, and behave the same as if no imports
667668 # existed.
668669
669- cmd ('update net-tools' , cwd = ws )
670+ cmd (f 'update { options } net-tools' , cwd = ws )
670671 with pytest .raises (ManifestImportFailed ):
671672 Manifest .from_topdir (topdir = ws )
672673 manifest = Manifest .from_topdir (topdir = ws ,
@@ -677,10 +678,10 @@ def test_update_some_with_imports(repos_tmpdir):
677678 assert net_tools_project .is_cloned ()
678679 assert not zephyr_project .is_cloned ()
679680
680- cmd ('update zephyr' , cwd = ws )
681+ cmd (f 'update { options } zephyr' , cwd = ws )
681682 assert zephyr_project .is_cloned ()
682683
683- cmd ('update' , cwd = ws )
684+ cmd (f 'update { options } ' , cwd = ws )
684685 manifest = Manifest .from_topdir (topdir = ws )
685686 assert manifest .get_projects (['Kconfiglib' ])[0 ].is_cloned ()
686687
0 commit comments