diff options
author | Charles Baylis <charles.baylis@linaro.org> | 2017-03-03 13:28:33 +0000 |
---|---|---|
committer | Charles Baylis <charles.baylis@linaro.org> | 2017-03-03 14:42:28 +0100 |
commit | f4baebf6f568a25d3a21e8722cd54cff59b0b563 (patch) | |
tree | b20b29a75a431666246972868c01dda89e2ec94b | |
parent | 1ec17f38f77bcb264679cb99a5ed23ab434e719a (diff) |
Update abe-tests for manifest format 1.4.
Handle mingw_only and mingw_extraconf flags.
Test that mingw and linux manifests are identical.
Make expat and python required components for manifest format >= 1.4
Change-Id: I60fcb8d7d5bb58ab5d3c628551817e04bcde7996
-rwxr-xr-x | test-checkout.sh | 15 | ||||
-rwxr-xr-x | validate-manifest.pl | 15 |
2 files changed, 26 insertions, 4 deletions
diff --git a/test-checkout.sh b/test-checkout.sh index b37d57b..c33973f 100755 --- a/test-checkout.sh +++ b/test-checkout.sh @@ -202,14 +202,27 @@ test_previous_abe_cmd_line() "$ABE_TESTS_PATH/compare-manifests.pl" --ignore-revisions mani1.txt mani2.txt } +manifest_after_1_4() +{ + local mani_ver=$(grep ^manifest_format= "$1" | cut -d = -f 2) + case "$mani_ver" in + 1.[123]) return 1;; + *) return 0;; + esac +} + +# check that mingw manifests match Linux manifests test_mingw() { set -ex - $ABE_PATH/abe.sh --checkout all --target "$BUILD_TARGET" --host i686-w64-mingw32 + $ABE_PATH/abe.sh --checkout all --target "$BUILD_TARGET" relocate_manifest mani1.txt $ABE_PATH/abe.sh --checkout all --target "$BUILD_TARGET" --host i686-w64-mingw32 --enable update relocate_manifest mani2.txt validate_manifests mani1.txt mani2.txt + if manifest_after_1_4 mani1.txt; then + "$ABE_TESTS_PATH/compare-manifests.pl" mani1.txt mani2.txt + fi } diff --git a/validate-manifest.pl b/validate-manifest.pl index 3797917..cc6164f 100755 --- a/validate-manifest.pl +++ b/validate-manifest.pl @@ -237,6 +237,8 @@ sub fields_for_component $fields{revision} = 1; $fields{branch} = 1; } + $fields{mingw_only} = 1 if version_ge($m, "1.4"); + $fields{mingw_extraconf} = 0 if version_ge($m, "1.4"); return %fields; } @@ -381,6 +383,13 @@ sub check_components_list my @win32_components = qw(expat python); my @valid_clibs = qw(glibc newlib eglibc); + # in version 1.4 manifests, expat and python are required + if (version_ge($m, "1.4")) + { + push @required_components, @win32_components; + @win32_components=(); + } + if (($m->{flag_info}{target}) =~ /linux/) { push @required_components, @linux_target_components @@ -419,10 +428,10 @@ sub check_components_list sub check_manifest_version { my ($m) = @_; - if ($m->{mani_ver} !~ /^1\.[123]$/) + if ($m->{mani_ver} !~ /^1\.[1234]$/) { - error($m, "Unknown manifest version $m->{mani_ver}, treating as 1.3"); - $m->{mani_ver} = "1.3"; + error($m, "Unknown manifest version $m->{mani_ver}, treating as 1.4"); + $m->{mani_ver} = "1.4"; } } |