@@ -65,34 +65,42 @@ function run_app_smoke_tests {
65
65
66
66
echo " "
67
67
echo " ### Testing app with Python $python_app_dot_version on OS: $operating_system "
68
- archive_to_test=$( ls -1 -R release/archives/ | grep " $python_app_version -$operating_system " )
69
68
70
- echo " #### Testing $archive_to_test with Python $python_app_dot_version on OS: $operating_system "
69
+ # check if the tag file exist meaning we have already completed the tests
70
+ tag_file=" scancode-release-tested-for-python-$python_app_dot_version -$operating_system "
71
+ if [ ! -f $tag_file ]; then
72
+ archive_to_test=$( ls -1 -R release/archives/ | grep " $python_app_version -$operating_system " )
71
73
72
- # Check checksum of archive and script since it transits through file.io
73
- sha_arch=$( sha256sum release/archives/$archive_to_test | awk ' { print $1 }' )
74
- sha_py=$( sha256sum etc/release/scancode_release_tests.py | awk ' { print $1 }' )
74
+ echo " #### Testing $archive_to_test with Python $python_app_dot_version on OS: $operating_system "
75
75
76
- echo " #### Creating a temp archive that contains the tested archive: $archive_file and the test script"
77
- archive_file=input.tar.gz
78
- tar -czf $archive_file \
79
- -C release/archives $archive_to_test \
80
- -C ../../etc/release scancode_release_tests.py
76
+ # Check checksum of archive and script since it transits through file.io
77
+ sha_arch=$( sha256sum release/archives/$archive_to_test | awk ' { print $1 }' )
78
+ sha_py=$( sha256sum etc/release/scancode_release_tests.py | awk ' { print $1 }' )
81
79
82
- tar -tvf $archive_file
80
+ echo " #### Creating a temp archive that contains the tested archive: $archive_file and the test script"
81
+ archive_file=input.tar.gz
82
+ tar -czf $archive_file \
83
+ -C release/archives $archive_to_test \
84
+ -C ../../etc/release scancode_release_tests.py
83
85
84
- echo " #### Remote test command: python scancode_release_tests.py app $archive_to_test sha_arch: $sha_arch sha_py: $sha_py "
86
+ tar -tvf $archive_file
85
87
86
- romp \
87
- --interpreter cpython \
88
- --architecture x86_64 \
89
- --check-period 5 \
90
- --version $python_app_dot_version \
91
- --platform $operating_system \
92
- --archive-file $archive_file \
93
- --command " python scancode_release_tests.py app $archive_to_test $sha_arch $sha_py "
88
+ echo " #### Remote test command: python scancode_release_tests.py app $archive_to_test sha_arch:$sha_arch sha_py:$sha_py "
94
89
95
- echo " #### RELEASE TEST: Completed App tests of $archive_to_test with Python $python_app_dot_version on OS: $operating_system "
90
+ romp \
91
+ --interpreter cpython \
92
+ --architecture x86_64 \
93
+ --check-period 5 \
94
+ --version $python_app_dot_version \
95
+ --platform $operating_system \
96
+ --archive-file $archive_file \
97
+ --command " python scancode_release_tests.py app $archive_to_test $sha_arch $sha_py "
98
+
99
+ echo " #### RELEASE TEST: Completed App tests of $archive_to_test with Python $python_app_dot_version on OS: $operating_system "
100
+ touch $tag_file
101
+ else
102
+ echo " #### RELEASE TEST: NOT RE-TESTING $archive_to_test with Python $python_app_dot_version on OS: $operating_system "
103
+ fi
96
104
}
97
105
98
106
@@ -109,46 +117,55 @@ function run_pypi_smoke_tests {
109
117
python_dot_versions=$2
110
118
operating_systems=$3
111
119
120
+ # check if the tag file exist meaning we have already completed the tests
121
+ tag_file=" scancode-release-pypi-tested-for-$archive_to_test "
122
+
112
123
echo " "
113
124
echo " ### Testing $archive_to_test with Pythons: $python_dot_versions on OSses: $operating_systems "
114
125
115
- # Check checksum of archive and script since it transits through file.io
116
- sha_arch=$( sha256sum release/pypi/$archive_to_test | awk ' { print $1 }' )
117
- sha_py=$( sha256sum etc/release/scancode_release_tests.py | awk ' { print $1 }' )
126
+ if [ ! -f $tag_file ]; then
118
127
119
- echo " #### Creating a temp archive that contains the tested archive: $archive_file and the test script"
120
- archive_file=input.tar.gz
121
- tar -czf $archive_file \
122
- -C release/pypi $archive_to_test \
123
- -C ../../etc/release scancode_release_tests.py
128
+ # Check checksum of archive and script since it transits through file.io
129
+ sha_arch=$( sha256sum release/pypi/$archive_to_test | awk ' { print $1 }' )
130
+ sha_py=$( sha256sum etc/release/scancode_release_tests.py | awk ' { print $1 }' )
124
131
125
- tar -tvf $archive_file
132
+ echo " #### Creating a temp archive that contains the tested archive: $archive_to_test and the test script: release scancode_release_tests.py"
133
+ archive_file=input.tar.gz
134
+ tar -czf $archive_file \
135
+ -C release/pypi $archive_to_test \
136
+ -C ../../etc/release scancode_release_tests.py
126
137
127
- echo " #### Remote test command: python scancode_release_tests.py pypi archive_to_test: $archive_to_test sha_arch: $sha_arch sha_py: $sha_py "
138
+ tar -tvf $archive_file
128
139
129
- # build options for Python versions and OS
130
- ver_opts=" "
131
- for pdv in $python_dot_versions
132
- do
133
- ver_opts=" $ver_opts --version $pdv "
134
- done
140
+ echo " #### Remote test command: python scancode_release_tests.py pypi archive_to_test:$archive_to_test sha_arch:$sha_arch sha_py:$sha_py "
135
141
136
- os_opts=" "
137
- for os in $operating_systems
138
- do
139
- os_opts=" $os_opts --platform $os "
140
- done
142
+ # build options for Python versions and OS
143
+ ver_opts=" "
144
+ for pdv in $python_dot_versions
145
+ do
146
+ ver_opts=" $ver_opts --version $pdv "
147
+ done
141
148
142
- romp \
143
- --interpreter cpython \
144
- --architecture x86_64 \
145
- --check-period 5 \
146
- $ver_opts \
147
- $os_opts \
148
- --archive-file $archive_file \
149
- --command " python scancode_release_tests.py pypi $archive_to_test $sha_arch $sha_py "
149
+ os_opts=" "
150
+ for os in $operating_systems
151
+ do
152
+ os_opts=" $os_opts --platform $os "
153
+ done
150
154
151
- echo " #### RELEASE TEST: Completed PyPI tests of $archive_to_test with Pythons: $python_dot_versions on OSses: $operating_systems "
155
+ romp \
156
+ --interpreter cpython \
157
+ --architecture x86_64 \
158
+ --check-period 5 \
159
+ $ver_opts \
160
+ $os_opts \
161
+ --archive-file $archive_file \
162
+ --command " python scancode_release_tests.py pypi $archive_to_test $sha_arch $sha_py "
163
+
164
+ echo " #### RELEASE TEST: Completed PyPI tests of $archive_to_test with Pythons: $python_dot_versions on OSses: $operating_systems "
165
+ touch $tag_file
166
+ else
167
+ echo " #### RELEASE TEST: NOT RE-TESTING Pypi $archive_to_test with Python $python_app_dot_version on OSses: $operating_systems "
168
+ fi
152
169
153
170
}
154
171
0 commit comments