diff options
Diffstat (limited to 'erts/etc')
-rw-r--r-- | erts/etc/common/run_test.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/erts/etc/common/run_test.c b/erts/etc/common/run_test.c index 042b8571ca..42e99bce23 100644 --- a/erts/etc/common/run_test.c +++ b/erts/etc/common/run_test.c @@ -85,6 +85,7 @@ static char* strsave(char* string); static void push_words(char* src); static int run_erlang(char* name, char** argv); static char* get_default_emulator(char* progname); +static void print_deprication_warning(char *progname); #ifdef __WIN32__ static char* possibly_quote(char* arg); #endif @@ -131,6 +132,8 @@ main(int argc, char** argv) int erl_args; char** argv0 = argv; + print_deprication_warning(argv[0]); + emulator = get_default_emulator(argv[0]); /* @@ -432,6 +435,27 @@ strsave(char* string) return p; } +/* Instead of making sure basename exists, we do our own */ +static char *simple_basename(char *path) +{ + char *ptr; + for (ptr = path; *ptr != '\0'; ++ptr) { + if (*ptr == '/') { + path = ptr + 1; + } + } + return path; +} + +static void print_deprication_warning(char* progpath) +{ + char *basename = simple_basename(progpath); + if(strcmp(basename,"run_test") == 0 || + strcmp(basename, "run_test.exe") == 0) { + printf("---***---\nDepricated: run_test is depricated and will be removed in R16B,\n please use ct_run instead\n---***---\n"); + } +} + static char* get_default_emulator(char* progname) { |