@@ -61,24 +61,33 @@ if [[ "$TEST" == "plugin-from-pypi" ]]; then
6161 git checkout ${COMPONENT_VERSION} -- pulp_file/tests/
6262fi
6363
64+ cat unittest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/unittest_requirements.txt"
65+ cat functest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/functest_requirements.txt"
66+ cmd_prefix pip3 install -r /tmp/unittest_requirements.txt
67+ cmd_prefix pip3 install -r /tmp/functest_requirements.txt
68+ cmd_prefix pip3 install --upgrade ../pulp-smash
69+
6470cd ../pulp-openapi-generator
71+ ./generate.sh pulp_file python
72+ cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_file-client
73+ sudo rm -rf ./pulp_file-client
6574./generate.sh pulpcore python
66- pip install . /pulpcore-client
67- rm -rf ./pulpcore-client
75+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulpcore-client
76+ sudo rm -rf ./pulpcore-client
6877if [[ " $TEST " = ' bindings' ]]; then
6978 ./generate.sh pulpcore ruby 0
7079 cd pulpcore-client
7180 gem build pulpcore_client.gemspec
72- gem install --both . /pulpcore_client-0.gem
81+ cmd_prefix gem install --both /root/pulp-openapi-generator/pulpcore-client /pulpcore_client-0.gem
7382fi
7483./generate.sh pulp_certguard python
75- pip install . /pulp_certguard-client
76- rm -rf ./pulp_certguard-client
84+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulp_certguard-client
85+ sudo rm -rf ./pulp_certguard-client
7786if [[ " $TEST " = ' bindings' ]]; then
7887 ./generate.sh pulp-certguard ruby 0
7988 cd pulp-certguard-client
8089 gem build pulp-certguard_client.gemspec
81- gem install --both . /pulp-certguard_client-0.gem
90+ cmd_prefix gem install --both /root/pulp-openapi-generator/pulp-certguard-client /pulp-certguard_client-0.gem
8291 cd ..
8392fi
8493cd $REPO_ROOT
@@ -93,8 +102,8 @@ if [[ "$TEST" = 'bindings' ]]; then
93102 exit
94103fi
95104
96- cat unittest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/unittest_requirements.txt "
97- cmd_prefix pip3 install -r /tmp/unittest_requirements.txt
105+ CERTIFI= $( cmd_prefix python3 -c ' import certifi; print(certifi.where()) ' )
106+ cmd_prefix bash -c " cat /etc/pulp/certs/pulp_webserver.crt | tee -a " $CERTIFI " > /dev/null "
98107
99108# check for any uncommitted migrations
100109echo " Checking for uncommitted migrations..."
@@ -106,16 +115,13 @@ if [[ "$TEST" != "upgrade" ]]; then
106115fi
107116
108117# Run functional tests
109- export PYTHONPATH=$REPO_ROOT /../pulp-certguard${PYTHONPATH: +: ${PYTHONPATH} }
110- export PYTHONPATH=$REPO_ROOT ${PYTHONPATH: +: ${PYTHONPATH} }
111-
112118
113119if [[ " $TEST " == " upgrade" ]]; then
114120 # Handle app label change:
115121 sed -i " /require_pulp_plugins(/d" pulp_file/tests/functional/utils.py
116122
117123 # Running pre upgrade tests:
118- pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.pre
124+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.pre"
119125
120126 # Checking out ci_upgrade_test branch and upgrading plugins
121127 cmd_prefix bash -c " cd pulpcore; git checkout -f ci_upgrade_test; pip install --upgrade --force-reinstall ."
@@ -157,25 +163,25 @@ if [[ "$TEST" == "upgrade" ]]; then
157163 # Rebuilding bindings
158164 cd ../pulp-openapi-generator
159165 ./generate.sh pulpcore python
160- pip install . /pulpcore-client
166+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulpcore-client
161167 ./generate.sh pulp_file python
162- pip install . /pulp_file-client
168+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulp_file-client
163169 ./generate.sh pulp_certguard python
164- pip install . /pulp_certguard-client
170+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulp_certguard-client
165171 cd $REPO_ROOT
166172
167173 # Running post upgrade tests
168174 git checkout ci_upgrade_test -- pulp_file/tests/
169- pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post
175+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post"
170176 exit
171177fi
172178
173179
174180if [[ " $TEST " == " performance" ]]; then
175181 if [[ -z ${PERFORMANCE_TEST+x} ]]; then
176- pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance
182+ cmd_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance"
177183 else
178- pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST
184+ cmd_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST "
179185 fi
180186 exit
181187fi
@@ -185,20 +191,20 @@ if [ -f $FUNC_TEST_SCRIPT ]; then
185191else
186192
187193 if [[ " $GITHUB_WORKFLOW " == " File Nightly CI/CD" ]]; then
188- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8
189- pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m " not parallel"
194+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8"
195+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m ' not parallel' "
190196
191197
192- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m " from_pulpcore_for_all_plugins and parallel" -n 8
193- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m " from_pulpcore_for_all_plugins and not parallel"
198+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m ' from_pulpcore_for_all_plugins and parallel' -n 8"
199+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m ' from_pulpcore_for_all_plugins and not parallel' "
194200
195201 else
196- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m " parallel and not nightly" -n 8
197- pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m " not parallel and not nightly"
202+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m ' parallel and not nightly' -n 8"
203+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m ' not parallel and not nightly' "
198204
199205
200- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m " from_pulpcore_for_all_plugins and not nightly and parallel" -n 8
201- pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m " from_pulpcore_for_all_plugins and not nightly and not parallel"
206+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m ' from_pulpcore_for_all_plugins and not nightly and parallel' -n 8"
207+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m ' from_pulpcore_for_all_plugins and not nightly and not parallel' "
202208
203209 fi
204210
0 commit comments