On 23 August 2017 at 01:04, Sam <[email protected]> wrote: > Hi all, > > I'm testing, I add a new at file, and in that file, I run another shell > script like this: > > AT_SETUP([vhost - run prepare-env.sh]) >> #OVS_VSWITCHD_START >> # No need to create, as bond1 has been created. >> echo "@@@@@@@@@@@@@@@@@" >> /root/gangyewei/mvs/mvs/tests/prepare-env.sh >> AT_CHECK([echo "############"]) >> AT_CHECK([/root/gangyewei/mvs/mvs/tests/prepare_env], [0], [stdout]) >> #OVS_VSWITCHD_STOP >> AT_CLEANUP > > > I use root to run the tests, But the log show me permission error, how to > fix this bug and how to run shell script in at file? > > # -*- compilation -*- >> 1. vhost.at:23: testing vhost - run prepare-env.sh ... >> @@@@@@@@@@@@@@@@@ >> /root/gangyewei/mvs/mvs/tests/testsuite.dir/at-groups/1/test-source: line >> 12: /root/gangyewei/mvs/mvs/tests/prepare-env.sh: Permission denied >> ./vhost.at:30: echo "############"
The above is the command being run. >> --- /dev/null 2017-02-21 23:39:22.882000049 +0800 >> +++ /root/gangyewei/mvs/mvs/tests/testsuite.dir/at-groups/1/stdout >> 2017-08-23 15:43:29.348993538 +0800 >> @@ -0,0 +1 @@ >> +############ The above is intended to read like a diff from expected to actual results, and it states that the line with "############" is extra compared to the expected results. AT_CHECK by default will check that the command is successful, and also check that there is no output. Perhaps try something like this? AT_CHECK([echo "############"], [0], [ignore]) _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
