i have my RbcTest.php in the test/unit directory
in the bash script the word “test” is it a keyword?
i use the vi editor and it the word is in yellow, as soon as i change the test to tests the whole path is purple??
export WORKSPACE=phoenix
export SYMFONY=$WORKSPACE/usr/share/php/data/symfony
(cd $WORKSPACE
echo ${PWD}
echo "6. Clearing the cache"
./symfony cc
echo "7. Run unit test"
php test/unit/RbcTest.php
)
warning and error:
7. Run unit test
PHP Warning: require_once(/usr/share/php/symfony/autoload/sfCoreAutoload.class.php): failed to open stream: No such file or directory in /var/lib/jenkins/workspace/b32b733b59ba6be9884da7427bee5c95/phoenix/config/ProjectConfiguration.class.php on line 3
PHP Stack trace:
PHP 1. {main}() /var/lib/jenkins/workspace/b32b733b59ba6be9884da7427bee5c95/phoenix/test/unit/RbcTest.php:0
PHP 2. require_once() /var/lib/jenkins/workspace/b32b733b59ba6be9884da7427bee5c95/phoenix/test/unit/RbcTest.php:3
PHP 3. require_once() /var/lib/jenkins/workspace/b32b733b59ba6be9884da7427bee5c95/phoenix/test/bootstrap/unit.php:14
PHP Fatal error: require_once(): Failed opening required '/usr/share/php/symfony/autoload/sfCoreAutoload.class.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/lib/jenkins/workspace/b32b733b59ba6be9884da7427bee5c95/phoenix/config/ProjectConfiguration.class.php on line 3
PHP Stack trace:
PHP 1. {main}() /var/lib/jenkins/workspace/b32b733b59ba6be9884da7427bee5c95/phoenix/test/unit/RbcTest.php:0
PHP 2. require_once() /var/lib/jenkins/workspace/b32b733b59ba6be9884da7427bee5c95/phoenix/test/unit/RbcTest.php:3
PHP 3. require_once() /var/lib/jenkins/workspace/b32b733b59ba6be9884da7427bee5c95/phoenix/test/bootstrap/unit.php:14
thanks
In Bash script
testis indeed a keyword, although in this case vi is simply confused. You usetest, for example, inifclauses:I never use this keywoard because you can also use
[instead, which I find prettier:To avoid vi highlighting it as a keyword, use strings:
As to why you’re script is not working, it would help if you could clarify exactly what error you’re getting. Maybe you can try this:
chmod +x script.sh#!/bin/bash