@@ -61,24 +61,30 @@ 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
6571./generate.sh pulpcore python
66- pip install . /pulpcore-client
67- rm -rf ./pulpcore-client
72+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulpcore-client
73+ sudo rm -rf ./pulpcore-client
6874if [[ " $TEST " = ' bindings' ]]; then
6975 ./generate.sh pulpcore ruby 0
7076 cd pulpcore-client
7177 gem build pulpcore_client.gemspec
72- gem install --both . /pulpcore_client-0.gem
78+ cmd_prefix gem install --both /root/pulp-openapi-generator/pulpcore-client /pulpcore_client-0.gem
7379fi
7480./generate.sh pulp_certguard python
75- pip install . /pulp_certguard-client
76- rm -rf ./pulp_certguard-client
81+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulp_certguard-client
82+ sudo rm -rf ./pulp_certguard-client
7783if [[ " $TEST " = ' bindings' ]]; then
7884 ./generate.sh pulp-certguard ruby 0
7985 cd pulp-certguard-client
8086 gem build pulp-certguard_client.gemspec
81- gem install --both . /pulp-certguard_client-0.gem
87+ cmd_prefix gem install --both /root/pulp-openapi-generator/pulp-certguard-client /pulp-certguard_client-0.gem
8288 cd ..
8389fi
8490cd $REPO_ROOT
@@ -93,8 +99,10 @@ if [[ "$TEST" = 'bindings' ]]; then
9399 exit
94100fi
95101
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
102+ CERTIFI=$( cmd_prefix python3 -c ' import certifi; print(certifi.where())' )
103+ cmd_prefix bash -c " cat /etc/pulp/certs/pulp_webserver.crt | tee -a " $CERTIFI " > /dev/null"
104+
105+ # Build and install bindings
98106
99107# check for any uncommitted migrations
100108echo " Checking for uncommitted migrations..."
@@ -106,16 +114,13 @@ if [[ "$TEST" != "upgrade" ]]; then
106114fi
107115
108116# Run functional tests
109- export PYTHONPATH=$REPO_ROOT /../pulp-certguard${PYTHONPATH: +: ${PYTHONPATH} }
110- export PYTHONPATH=$REPO_ROOT ${PYTHONPATH: +: ${PYTHONPATH} }
111-
112117
113118if [[ " $TEST " == " upgrade" ]]; then
114119 # Handle app label change:
115120 sed -i " /require_pulp_plugins(/d" pulp_file/tests/functional/utils.py
116121
117122 # Running pre upgrade tests:
118- pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.pre
123+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.pre"
119124
120125 # Checking out ci_upgrade_test branch and upgrading plugins
121126 cmd_prefix bash -c " cd pulpcore; git checkout -f ci_upgrade_test; pip install --upgrade --force-reinstall ."
@@ -157,25 +162,25 @@ if [[ "$TEST" == "upgrade" ]]; then
157162 # Rebuilding bindings
158163 cd ../pulp-openapi-generator
159164 ./generate.sh pulpcore python
160- pip install . /pulpcore-client
165+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulpcore-client
161166 ./generate.sh pulp_file python
162- pip install . /pulp_file-client
167+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulp_file-client
163168 ./generate.sh pulp_certguard python
164- pip install . /pulp_certguard-client
169+ cmd_prefix pip3 install /root/pulp-openapi-generator /pulp_certguard-client
165170 cd $REPO_ROOT
166171
167172 # Running post upgrade tests
168173 git checkout ci_upgrade_test -- pulp_file/tests/
169- pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post
174+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post"
170175 exit
171176fi
172177
173178
174179if [[ " $TEST " == " performance" ]]; then
175180 if [[ -z ${PERFORMANCE_TEST+x} ]]; then
176- pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance
181+ cmd_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance"
177182 else
178- pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST
183+ cmd_prefix bash -c " pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST "
179184 fi
180185 exit
181186fi
@@ -185,20 +190,20 @@ if [ -f $FUNC_TEST_SCRIPT ]; then
185190else
186191
187192 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"
193+ cmd_prefix bash -c " pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8"
194+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m ' not parallel' "
190195
191196
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"
197+ 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"
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 not parallel' "
194199
195200 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"
201+ 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"
202+ cmd_prefix bash -c " pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m ' not parallel and not nightly' "
198203
199204
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"
205+ 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"
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 not parallel' "
202207
203208 fi
204209
0 commit comments