Do not modify unix rights in case of unit tests
authorCédric Ollivier <cedric.ollivier@orange.com>
Thu, 3 Nov 2016 16:06:18 +0000 (17:06 +0100)
committerMorgan Richomme <morgan.richomme@orange.com>
Fri, 4 Nov 2016 11:09:09 +0000 (11:09 +0000)
Even if the unit tests define main, nosetests oblige by default to
remove their executable bit. It also fixes the unix rights of Sfc.py.

Change-Id: Icbbb5b3118b16eff75b13d927e674a9764d6d83f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docker/Dockerfile
testcases/Controllers/ONOS/Sfc/Sfc.py [changed mode: 0644->0755]

index 9ff0f4f..fd37e42 100644 (file)
@@ -107,7 +107,8 @@ RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
 RUN pip install -r ${repos_dir}/rally/requirements.txt
 RUN pip install -r ${repos_dir}/tempest/requirements.txt
 
-RUN find ${repos_dir}/functest -name "*.py" |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755
+RUN find ${repos_dir}/functest -name "*.py" \
+    -not -path *unit_tests* |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755
 RUN find ${repos_dir}/functest -name "*.sh" |xargs grep \#\! |cut -d\:  -f 1 |xargs chmod -c 755
 
 RUN /bin/bash ${repos_dir}/parser/tests/parser_install.sh ${repos_dir}
old mode 100644 (file)
new mode 100755 (executable)