@@ -447,14 +447,14 @@ def test_grep(west_init_tmpdir):
447447
448448 assert re .search ('west-commands' , cmd ('grep -- -- -commands' ))
449449
450-
451- def test_update_projects (west_init_tmpdir ):
450+ @ pytest . mark . parametrize ( "options" , [ "" , "-j 1" , "-j 2" , "-j" ])
451+ def test_update_projects (options , west_init_tmpdir ):
452452 # Test the 'west update' command. It calls through to the same backend
453453 # functions that are used for automatic updates and 'west init'
454454 # reinitialization.
455455
456456 # create local repositories
457- cmd ('update' )
457+ cmd ('update ' + options )
458458
459459 # Add commits to the local repos.
460460 ur = update_helper (west_init_tmpdir )
@@ -644,7 +644,8 @@ def test_update_head_0(west_init_tmpdir):
644644 assert modified_files .strip () == "M CODEOWNERS" , \
645645 'local zephyr change not preserved'
646646
647- def test_update_some_with_imports (repos_tmpdir ):
647+ @pytest .mark .parametrize ("options" , ["" , "-j 1" , "-j 2" , "-j -1" ])
648+ def test_update_some_with_imports (options , repos_tmpdir ):
648649 # 'west update project1 project2' should work fine even when
649650 # imports are used, as long as the relevant projects are all
650651 # defined in the manifest repository.
@@ -685,19 +686,19 @@ def test_update_some_with_imports(repos_tmpdir):
685686 # Updating unknown projects should fail as always.
686687
687688 with pytest .raises (subprocess .CalledProcessError ):
688- cmd ('update unknown-project' , cwd = ws )
689+ cmd (f 'update { options } unknown-project' , cwd = ws )
689690
690691 # Updating a list of projects when some are resolved via project
691692 # imports must fail.
692693
693694 with pytest .raises (subprocess .CalledProcessError ):
694- cmd ('update Kconfiglib net-tools' , cwd = ws )
695+ cmd (f 'update { options } Kconfiglib net-tools' , cwd = ws )
695696
696697 # Updates of projects defined in the manifest repository or all
697698 # projects must succeed, and behave the same as if no imports
698699 # existed.
699700
700- cmd ('update net-tools' , cwd = ws )
701+ cmd (f 'update { options } net-tools' , cwd = ws )
701702 with pytest .raises (ManifestImportFailed ):
702703 Manifest .from_topdir (topdir = ws )
703704 manifest = Manifest .from_topdir (topdir = ws ,
@@ -708,10 +709,10 @@ def test_update_some_with_imports(repos_tmpdir):
708709 assert net_tools_project .is_cloned ()
709710 assert not zephyr_project .is_cloned ()
710711
711- cmd ('update zephyr' , cwd = ws )
712+ cmd (f 'update { options } zephyr' , cwd = ws )
712713 assert zephyr_project .is_cloned ()
713714
714- cmd ('update' , cwd = ws )
715+ cmd (f 'update { options } ' , cwd = ws )
715716 manifest = Manifest .from_topdir (topdir = ws )
716717 assert manifest .get_projects (['Kconfiglib' ])[0 ].is_cloned ()
717718
0 commit comments