Commit a6e6b04f a6e6b04f609fa5d207f0e29a7793a69fa1294d6b by Laurent Jouanneau

clitests: Fixes issue with phantomjs path

In travis environment, PHANTOMJS_EXECUTABLE contains a relative
path to phantomjs executable.

However, new tests change the working directory, so this path becomes
invalid. We should set PHANTOMJS_EXECUTABLE to an absolute path.
1 parent 35ac717c
......@@ -9,7 +9,11 @@ import unittest
TEST_ROOT = os.path.abspath(os.path.dirname(__file__))
CASPERJS_ROOT = os.path.abspath(os.path.join(TEST_ROOT, '..', '..'))
CASPER_EXEC = os.path.join(CASPERJS_ROOT, 'bin', 'casperjs')
PHANTOMJS_EXEC = os.environ['PHANTOMJS_EXECUTABLE']
# make it to an absolute path, because some test change the working directory
# and relative path to phantomjs would be invalid
if not os.path.isabs(PHANTOMJS_EXEC):
os.environ['PHANTOMJS_EXECUTABLE'] = os.path.join(CASPERJS_ROOT, PHANTOMJS_EXEC)
class TimeoutException(Exception):
pass
......