gating: Test the installed pykickstart package
Test installed package, not the source itself. Resolves: rhbz#1968762
This commit is contained in:
		
							parent
							
								
									eb7467fc22
								
							
						
					
					
						commit
						41f88aae85
					
				| @ -1,31 +0,0 @@ | |||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| PATH=/usr/bin |  | ||||||
| TMPDIR="$(mktemp -d)" |  | ||||||
| CWD="$(pwd)" |  | ||||||
| 
 |  | ||||||
| PACKAGE=pykickstart |  | ||||||
| BRANCH= |  | ||||||
| 
 |  | ||||||
| # clone the dist-git tree for this package |  | ||||||
| cd ${TMPDIR} |  | ||||||
| fedpkg co ${PACKAGE} |  | ||||||
| cd ${PACKAGE} |  | ||||||
| [ -z "${BRANCH}" ] || fedpkg switch-branch ${BRANCH} |  | ||||||
| fedpkg prep |  | ||||||
| 
 |  | ||||||
| # scramble together the extracted source tree name |  | ||||||
| SRCDIR="${PACKAGE}-$(grep Version: ${PACKAGE}.spec | cut -d ' ' -f 2)" |  | ||||||
| 
 |  | ||||||
| # run the tests |  | ||||||
| cd ${SRCDIR} |  | ||||||
| make check |  | ||||||
| CHECK_RET=$? |  | ||||||
| make test |  | ||||||
| TEST_RET=$? |  | ||||||
| RET=$((${CHECK_RET} + ${TEST_RET})) |  | ||||||
| 
 |  | ||||||
| # clean up and exit |  | ||||||
| cd ${CWD} |  | ||||||
| rm -rf ${TMPDIR} |  | ||||||
| exit ${RET} |  | ||||||
							
								
								
									
										15
									
								
								tests/simple/run_tests.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								tests/simple/run_tests.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,15 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | set -eux | ||||||
|  | 
 | ||||||
|  | : ${1?"Usage: $0 TESTSDIR"} | ||||||
|  | TESTSDIR="$1" | ||||||
|  | SOURCEDIR="${TESTSDIR}/source/" | ||||||
|  | 
 | ||||||
|  | cd "${SOURCEDIR}" || exit | ||||||
|  | # Make sure the pykickstart source isn't tested | ||||||
|  | rm -rf ./pykickstart | ||||||
|  | 
 | ||||||
|  | # Run the unittests against the installed package | ||||||
|  | python3 -m unittest -v tests/*py tests/commands/*py tests/tools/*py | ||||||
|  | RET=$? | ||||||
|  | exit ${RET} | ||||||
| @ -1,17 +1,12 @@ | |||||||
| --- | --- | ||||||
| 
 |  | ||||||
| - hosts: localhost | - hosts: localhost | ||||||
|  |   tags: | ||||||
|  |     - classic | ||||||
|   roles: |   roles: | ||||||
|  |     - role: standard-test-source | ||||||
|     - role: standard-test-basic |     - role: standard-test-basic | ||||||
|       tags: |  | ||||||
|         - classic |  | ||||||
| 
 |  | ||||||
|       required_packages: |       required_packages: | ||||||
|         - fedpkg |         - python3-kickstart | ||||||
|         - python3-sphinx |  | ||||||
|         - python3-coverage |  | ||||||
| 
 |  | ||||||
|       tests: |       tests: | ||||||
|         - simple: |         - simple: | ||||||
|             dir: scripts/ |             run: ./run_tests.sh {{ tenv_workdir }} | ||||||
|             run: ./run_tests.sh |  | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user