diff options
author | Chris Evich <cevich@redhat.com> | 2019-04-02 11:38:14 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2019-04-03 09:57:20 -0400 |
commit | 599714d9f2b5d0715a5cda0275fbea64d581bbc6 (patch) | |
tree | 6f569aea9d7922ff8a1d64079b2d96ebc695b062 /contrib/cirrus/rootless_test.sh | |
parent | ad467ba16e5f78a159c730ea005830cfa075de15 (diff) | |
download | podman-599714d9f2b5d0715a5cda0275fbea64d581bbc6.tar.gz podman-599714d9f2b5d0715a5cda0275fbea64d581bbc6.tar.bz2 podman-599714d9f2b5d0715a5cda0275fbea64d581bbc6.zip |
Cirrus: Support special-case modes of testing
Previously libpod CI was fairly straight-forward, run unit and
integration tests in a standard set of 3 VMs. Off on the side was a
single special case of running tests as an ordinary user. There is a
desire to stop using the PAPR system to support testing inside of a
container.
Since having two special cases potentially invites more
down the road, make provisions to handle them more gracefully. This
commit introduces an environment variable: ``$SPECIALMODE``. It's
value has the following meanings within the CI scripts:
Mode 'none': Nothing special, business as usual (default)
Mode 'rootless': Rootless testing
Mode 'in_podman': Build container, run integration tests in it.
This will make adding additional special-cases later easier, as well as
extending the special cases in a Matrix across multiple OS's.
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/rootless_test.sh')
-rwxr-xr-x | contrib/cirrus/rootless_test.sh | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/contrib/cirrus/rootless_test.sh b/contrib/cirrus/rootless_test.sh index d0e2ceb95..88b38f45b 100755 --- a/contrib/cirrus/rootless_test.sh +++ b/contrib/cirrus/rootless_test.sh @@ -12,9 +12,9 @@ OS_RELEASE_ID $OS_RELEASE_ID OS_RELEASE_VER $OS_RELEASE_VER " -if ! run_rootless +if [[ "$UID" == "0" ]] then - echo "Error: Expected rootless env. vars not set or empty" + echo "Error: Expected to be running as a regular user" exit 1 fi @@ -24,16 +24,9 @@ echo "Hello, my name is $USER and I live in $PWD can I be your friend?" record_timestamp "rootless test start" cd "$GOSRC" -case "${OS_RELEASE_ID}-${OS_RELEASE_VER}" in - ubuntu-18) ;& # Continue to the next item - fedora-29) ;& - fedora-28) - make - make varlink_generate - make test-binaries - make ginkgo - ;; - *) bad_os_id_ver ;; -esac +make +make varlink_generate +make test-binaries +make ginkgo record_timestamp "rootless test end" |