Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename TRAVIS_CI environment variable #279

Open
aesteve-rh opened this issue Jul 8, 2022 · 2 comments
Open

Rename TRAVIS_CI environment variable #279

aesteve-rh opened this issue Jul 8, 2022 · 2 comments
Labels
tests Issues related to automated tests

Comments

@aesteve-rh
Copy link
Member

aesteve-rh commented Jul 8, 2022

The tests use TRAVIS_CI environment variable (e.g., in the broken_on_ci fixture) to determine if
we run in a CI, for tests that are expected to fail only in the pipeline run. Places where is used:

$ rg TRAVIS_CI                                                                                                                                                                                                                                        
tests/testValidation.py                                                                                                                                                                                                                                                                                                       
311:    To use on travis-ci, use name="TRAVIS_CI".  If a test is broken on both                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                              
tests/testing.py                                                                                                                                                                                                                                                                                                              
47:    return 'TRAVIS_CI' in os.environ                                                                                                                                                                                                                                                                                       

tests/network/nettestlib.py
509:    return 'TRAVIS_CI' in os.environ

tests/lib/protocoldetector_test.py
147:    @broken_on_ci("IPv6 not supported on travis", name="TRAVIS_CI")

tests/lib/yajsonrpc/stomprpcclient_test.py
138:    @broken_on_ci("Fails randomly in CI", name="TRAVIS_CI")
146:    @broken_on_ci("Fails randomly in CI", name="TRAVIS_CI")
158:    @broken_on_ci("Fails randomly in CI", name="TRAVIS_CI")
173:    @broken_on_ci("Fails randomly in CI", name="TRAVIS_CI")
214:    @broken_on_ci(reason="Fails randomly in CI", name="TRAVIS_CI")
232:    @broken_on_ci(reason="Fails randomly in CI", name="TRAVIS_CI")
276:    @broken_on_ci(reason="Fails randomly in CI", name="TRAVIS_CI")

tests/lib/yajsonrpc/stomp_test.py
85:        name="TRAVIS_CI")

tests/lib/yajsonrpc/jsonrpcserver_test.py
157:    @broken_on_ci(reason="Fails randomly in CI", name="TRAVIS_CI")
170:    @broken_on_ci("fails randomly in CI", name="TRAVIS_CI")
182:    @broken_on_ci("fails randomly in CI", name="TRAVIS_CI")
200:    @broken_on_ci("fails randomly in CI", name="TRAVIS_CI")
216:    @broken_on_ci("fails randomly in CI", name="TRAVIS_CI")
243:    @broken_on_ci("fails randomly in CI", name="TRAVIS_CI")
257:    @broken_on_ci("fails randomly in CI", name="TRAVIS_CI")
280:    @broken_on_ci("fails randomly in CI", name="TRAVIS_CI")

tests/storage/mount_test.py
141:    @broken_on_ci("mount check fails after successful mount", name="TRAVIS_CI")
152:    @broken_on_ci("mount check fails after successful mount", name="TRAVIS_CI")

tests/storage/filesd_test.py
148:        "OVIRT_CI" in os.environ or "TRAVIS_CI" in os.environ,

tests/container-shell
4:export TRAVIS_CI=1

tests/common/systemctl_test.py
36:    "OVIRT_CI" in os.environ or "TRAVIS_CI" in os.environ,

automation/check-patch.tests-container.environment.yaml
7: - name: 'TRAVIS_CI'

However, we do not run in Travis anymore, which makes the variable misleading.
We should rename the variable to avoid using Travis, to something such as RUN_ON_CI or OVIRT_CI, which is
more generic.

@aesteve-rh aesteve-rh added the tests Issues related to automated tests label Jul 8, 2022
@aesteve-rh aesteve-rh changed the title Change TRAVIS_CI environment variable from the CIs Rename TRAVIS_CI environment variable Jul 8, 2022
@nirs
Copy link
Member

nirs commented Jul 9, 2022

I think we can rename TRAVIS_CI to GITHUB_CI. All the OVIRT_CI checks are not relevant and likely can be removed.

Some of the TRAVIS_CI marks are also not relevant and can be removed, but not all. Some tests cannot run in containers so we cannot run them on github.

@aesteve-rh
Copy link
Member Author

GITHUB_CI sounds good too, although we would run into the same issue if we ever move the repository hosting to a different one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Issues related to automated tests
Projects
None yet
Development

No branches or pull requests

2 participants