diff options
author | Lukas Larsson <[email protected]> | 2010-11-11 20:01:18 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2010-11-29 11:59:34 +0100 |
commit | 14d2033ce29ebd2761026194682f5480576edb6d (patch) | |
tree | cfd3fa178ffe20a818b43cd6b96b1ae1af2ed9b4 /erts/etc/common/run_test.c | |
parent | 623c515a97516a262640dd0aae5a88cfaf179524 (diff) | |
download | otp-14d2033ce29ebd2761026194682f5480576edb6d.tar.gz otp-14d2033ce29ebd2761026194682f5480576edb6d.tar.bz2 otp-14d2033ce29ebd2761026194682f5480576edb6d.zip |
Add deprication warning to run_test.c
Diffstat (limited to 'erts/etc/common/run_test.c')
-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) { |