@@ -407,6 +407,77 @@ def test_manifest_freeze(west_update_tmpdir):
407407 '^ path: zephyr$' ]
408408 _match_multiline_regex (expected_res , actual )
409409
410+ def test_manifest_freeze_active (west_update_tmpdir ):
411+ # We should be able to freeze manifests with inactive projects.
412+ cmd ('config manifest.group-filter -- -Kconfiglib-group' )
413+
414+ actual = cmd ('manifest --freeze-active' ).splitlines ()
415+ # Same as test_manifest_freeze but without inactive projects
416+ expected_res = ['^manifest:$' ,
417+ '^ projects:$' ,
418+ '^ - name: tagged_repo$' ,
419+ '^ url: .*$' ,
420+ '^ revision: [a-f0-9]{40}$' ,
421+ '^ - name: net-tools$' ,
422+ '^ description: Networking tools.$' ,
423+ '^ url: .*$' ,
424+ '^ revision: [a-f0-9]{40}$' ,
425+ '^ clone-depth: 1$' ,
426+ '^ west-commands: scripts/west-commands.yml$' ,
427+ '^ self:$' ,
428+ '^ path: zephyr$' ]
429+ _match_multiline_regex (expected_res , actual )
430+
431+ def test_manifest_resolve (west_update_tmpdir ):
432+ # We should be able to resolve manifests.
433+ actual = cmd ('manifest --resolve' ).splitlines ()
434+ # Similar as test_manifest_freeze but with resolved projects
435+ expected_res = ['^manifest:$' ,
436+ '^ projects:$' ,
437+ '^ - name: Kconfiglib$' ,
438+ '^ description: |' ,
439+ '^ Kconfiglib is an implementation of$' ,
440+ '^ the Kconfig language written in Python.$' ,
441+ '^ url: .*$' ,
442+ '^ revision: zephyr$' ,
443+ '^ path: subdir/Kconfiglib$' ,
444+ '^ groups:$' ,
445+ '^ - Kconfiglib-group$' ,
446+ '^ submodules: true$' ,
447+ '^ - name: tagged_repo$' ,
448+ '^ url: .*$' ,
449+ '^ revision: v1.0$' ,
450+ '^ - name: net-tools$' ,
451+ '^ description: Networking tools.$' ,
452+ '^ url: .*$' ,
453+ '^ revision: master$' ,
454+ '^ clone-depth: 1$' ,
455+ '^ west-commands: scripts/west-commands.yml$' ,
456+ '^ self:$' ,
457+ '^ path: zephyr$' ]
458+ _match_multiline_regex (expected_res , actual )
459+
460+ def test_manifest_resolve_active (west_update_tmpdir ):
461+ # We should be able to resolve manifests with inactive projects.
462+ cmd ('config manifest.group-filter -- -Kconfiglib-group' )
463+
464+ actual = cmd ('manifest --resolve-active' ).splitlines ()
465+ # Same as test_manifest_resolve but without inactive projects
466+ expected_res = ['^manifest:$' ,
467+ '^ projects:$' ,
468+ '^ - name: tagged_repo$' ,
469+ '^ url: .*$' ,
470+ '^ revision: v1.0$' ,
471+ '^ - name: net-tools$' ,
472+ '^ description: Networking tools.$' ,
473+ '^ url: .*$' ,
474+ '^ revision: master$' ,
475+ '^ clone-depth: 1$' ,
476+ '^ west-commands: scripts/west-commands.yml$' ,
477+ '^ self:$' ,
478+ '^ path: zephyr$' ]
479+ _match_multiline_regex (expected_res , actual )
480+
410481def test_compare (config_tmpdir , west_init_tmpdir ):
411482 # 'west compare' with no projects cloned should still work,
412483 # and not print anything.
0 commit comments