runm3uatest: Avoid having to use a ~/.guile script#3
runm3uatest: Avoid having to use a ~/.guile script#3laf0rge wants to merge 1 commit intonplab:masterfrom
Conversation
Rather, we can specify the path in which the m3ua-testtool files are located using the '-d ...' command line argument of runm3uatest
|
|
||
| ;;; Change the following line to reflect where the files are located. | ||
| (define dir "/Users/tuexen/Documents/m3ua-testtool/") | ||
| (define dir "") |
There was a problem hiding this comment.
I would prefer to keep the directory name. On the one hand side it shows what to insert, on the other handside it breaks very early if you haven't changed it to an appropriate way.
There was a problem hiding this comment.
I find it somewhat strange and uncommon that the personal home directory of the developer is hard-coded in some files that are distributed with a project. That's why I was suggesting to move to a "all relative paths' setup where no installation is required, no files to the home directory need to be deployed, etc.
If the home directory must be present in this file, then there should be some template / pattern substitution mechanism that uses the actual "$HOME" at the time of installation.
| for testcase in $testcases | ||
| do | ||
| runm3uatest -t $timeout $testcase 2> /dev/null | ||
| ./runm3uatest -d . -t $timeout $testcase 2> /dev/null |
There was a problem hiding this comment.
This requires the binary to be in the directory where the script is. I assume that this is installed, which is also the case when running the tests manually.
There was a problem hiding this comment.
requiring installation of a helper script to some system PATH seems like a relatively odd choice for a test tool. 99.9% of the FOSS software I know of can be executed from within the checked out git repo / build directory, without requiring system-wide installation. I see that a s a strong benefit, avoiding to clutter my system usr/local/bin etc. with tons of cruft over time.
You're of course free to reject it. With the python-based altrnative executor of the other patch we at osmocom don't even use runm3uatest anymore. It was just something developed at an earlier stage trying to make the nplab-tests run for the first time some 4 years ago.
| @@ -0,0 +1 @@ | |||
| dotguile No newline at end of file | |||
There was a problem hiding this comment.
Not sure why .guile is showing up here. This file does not exists in this dir and should not be here.
| for testcase in $testcases | ||
| do | ||
| runm3uatest -t $timeout $testcase 2> /dev/null | ||
| ./runm3uatest -d . -t $timeout $testcase 2> /dev/null |
| timeout = TIMEOUT; | ||
|
|
||
| while ((c = getopt(argc, argv, "t:")) != -1) { | ||
| while ((c = getopt(argc, argv, "t:d:")) != -1) { |
There was a problem hiding this comment.
I would prefer to keep the options in alphabetic order.
| case 't': | ||
| timeout = (unsigned int)atoi(optarg); | ||
| break; | ||
| case 'd': |
There was a problem hiding this comment.
Keep the options in alphabetic order.
Rather, we can specify the path in which the m3ua-testtool files are
located using the '-d ...' command line argument of runm3uatest