[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange tests failure on Travis-CI due to AM_TESTS_ENVIRONMENT

From: Assaf Gordon
Subject: Strange tests failure on Travis-CI due to AM_TESTS_ENVIRONMENT
Date: Wed, 12 Mar 2014 00:25:07 -0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0


I'm trying to convert my project non-recursive makefile, and encountered a 
strange problem with the tests.

I managed to reproduce and isolate it using GNU hello, so I figured perhaps you 
can help me.

The problem is this:
1. GNU Hello, cloned from latest repository.
2. locally (on old ubuntu), "make check" works just fine.
3. Using "Travis-CI" (the website for continuous integration), the tests fail.

I've managed to pinpoint the issue to the following:
Inside Makefile.am, the test environment is set using AM_TESTS_ENVIRONMENT.
For some strange reason, this is ignored/bypassed on Travis-CI's servers (They 
are using Ubuntu 12.04 which should be standard).
When changed to TESTS_ENVIRONMENT, the tests pass.

The steps I've used:
1. Cloned GNU Hello, put in GitHub, setup Travis-CI.
"make check" fails, all tests can't find the "hello" executable.

This is the log, scroll to line 2139 to see the tests results:

2. Modified "tests/greeting-2", to print the environment and always fail:

This is the log, scroll to line 2168 to see the printed environment:
Note especially, the PATH does not contain "." and there is no "HELLO" variable 
(both are set in AM_TESTS_ENVIRONMENT).

3. Modified "Makefile.am", changed "AM_TESTS_ENVIRONMENT" to "TESTS_ENVIRONMENT"

This is the log after the change, scroll to line 2161 to see the updated 
printed environment:

After the change, PATH is valid and HELLO is set, and the tests pass (except 
'greeting-2' which fails on purpose).

So my question -
What's going on, and is changing "AM_TESTS_ENVIRONMENT" the correct solution?

Thank you,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]