X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f22fa286e259aad98dd2e0e37e39fa7e89151ae4..refs/heads/master:/tools/tesh/setenv.tesh?ds=sidebyside diff --git a/tools/tesh/setenv.tesh b/tools/tesh/setenv.tesh index 7ae9998cfc..81319826e7 100644 --- a/tools/tesh/setenv.tesh +++ b/tools/tesh/setenv.tesh @@ -1,31 +1,21 @@ -#! ./tesh +#!/usr/bin/env tesh # This suite builds and uses a program returning 1. # tesh is instructed of this return code and must not whine. -$ rm -rf temp_testdir -$ mkdir temp_testdir +! output ignore +$ cmake -E remove_directory temp_testdir_setenv -$ cd temp_testdir +$ mkdir temp_testdir_setenv +$ cd temp_testdir_setenv -< #include -< #include -< extern char **environ; -< int main(void) { -< char **env_iter=environ; -< while (*env_iter) { -< if (!strncmp(*env_iter,"tesh_test_toto=",strlen("tesh_test_toto="))) -< printf("%s\n",*env_iter); -< env_iter++; -< } -< return 0; -< } -$ cat > getenv.c - -$ gcc -o getenv getenv.c -g +< print "tesh_test_toto=$ENV{tesh_test_toto}"; +$ mkfile testenv.pl ! setenv tesh_test_toto=blah -$ ./getenv +$ perl testenv.pl > tesh_test_toto=blah $ cd .. -$ rm -rf temp_testdir + +! output ignore +$ cmake -E remove_directory temp_testdir_setenv