* Introduce a 'make dist' target compiling a *source* archive
'make package' compiles a binary archive (not well tested)
* Compile java files only on need
+ * Add --cd and --setenv command line options to tesh
Tracing:
* Tracing system
If the expected output do not match what the command spits, TESH will produce
an error showing the diff (see OUTPUT below).
+Command line arguments
+----------------------
+Tesh accepts several command line arguments:
+ --cd some/directory: ask tesh to switch the working directory before
+ lauching the tests
+ --setenv var=value: set a specific environment variable
+
IO orders
---------
memmove(argv + i, argv + i + 2, (argc - i - 1) * sizeof(char *));
argc -= 2;
i -= 2;
+ } else if (!strcmp(argv[i], "--setenv" )) {
+ if (i == argc - 1) {
+ ERROR0("--setenv argument requires an argument");
+ exit(1);
+ }
+ char *eq = strchr(argv[i+1], '=');
+ xbt_assert1(eq,"The argument of --setenv must contain a '=' (got %s instead)",argv[i+1]);
+ char *key = bprintf("%.*s", (int) (eq - argv[i+1]), argv[i+1]);
+ xbt_dict_set(env, key, xbt_strdup(eq + 1), xbt_free_f);
+ free(key);
+ VERB1("setenv %s", argv[i+1]);
+ memmove(argv + i, argv + i + 2, (argc - i - 1) * sizeof(char *));
+ argc -= 2;
+ i -= 2;
}
}