[PATCH 1/4] tests/test-util-filemonitor: Fix Travis-CI $ARCH env variable name

Philippe Mathieu-Daudé posted 4 patches 5 years, 8 months ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Thomas Huth <thuth@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Juan Quintela <quintela@redhat.com>, Fam Zheng <fam@euphon.net>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Cornelia Huck <cohuck@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>
There is a newer version of this series
[PATCH 1/4] tests/test-util-filemonitor: Fix Travis-CI $ARCH env variable name
Posted by Philippe Mathieu-Daudé 5 years, 8 months ago
While we can find reference of a 'TRAVIS_ARCH' variable in
the environment and source [1], per the Travis-CI multi-arch
documentation [2] the variable is named TRAVIS_CPU_ARCH.

[1] https://github.com/travis-ci/travis-build/blob/v10.0.0/lib/travis/build/bash/travis_setup_env.bash#L39
[2] https://docs.travis-ci.com/user/multi-cpu-architectures/#identifying-cpu-architecture-of-build-jobs

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/test-util-filemonitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-util-filemonitor.c b/tests/test-util-filemonitor.c
index 45009c69f4..e703a7f8fc 100644
--- a/tests/test-util-filemonitor.c
+++ b/tests/test-util-filemonitor.c
@@ -415,7 +415,7 @@ test_file_monitor_events(void)
      * This test does not work on Travis LXD containers since some
      * syscalls are blocked in that environment.
      */
-    travis_arch = getenv("TRAVIS_ARCH");
+    travis_arch = getenv("TRAVIS_CPU_ARCH");
     if (travis_arch && !g_str_equal(travis_arch, "x86_64")) {
         g_test_skip("Test does not work on non-x86 Travis containers.");
         return;
-- 
2.21.1


Re: [PATCH 1/4] tests/test-util-filemonitor: Fix Travis-CI $ARCH env variable name
Posted by Daniel P. Berrangé 5 years, 8 months ago
On Tue, Mar 17, 2020 at 09:05:38PM +0100, Philippe Mathieu-Daudé wrote:
> While we can find reference of a 'TRAVIS_ARCH' variable in
> the environment and source [1], per the Travis-CI multi-arch
> documentation [2] the variable is named TRAVIS_CPU_ARCH.
> 
> [1] https://github.com/travis-ci/travis-build/blob/v10.0.0/lib/travis/build/bash/travis_setup_env.bash#L39
> [2] https://docs.travis-ci.com/user/multi-cpu-architectures/#identifying-cpu-architecture-of-build-jobs
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/test-util-filemonitor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|