[PATCHv3,1/2] utils/test-pkg: fix long option parsing

Message ID 20190205212142.2244-1-patrickdepinguin@gmail.com
State New
Headers show
Series
  • [PATCHv3,1/2] utils/test-pkg: fix long option parsing
Related show

Commit Message

Thomas De Schampheleire Feb. 5, 2019, 9:21 p.m.
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

The long option parsing of test-pkg is broken because:
- some long options are not declared
- there should be a comma between long options, the colon does not replace
it.

This change also revealed that the declaration of 'toolchains-dir' should
have been 'toolchains-csv', originally introduced in commit ed59f81a3cb4ddb.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
 utils/test-pkg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

v3: unchanged
v2: new patch

Patch

diff --git a/utils/test-pkg b/utils/test-pkg
index 1995fa8578..087f9ddca9 100755
--- a/utils/test-pkg
+++ b/utils/test-pkg
@@ -5,12 +5,12 @@  TOOLCHAINS_CSV='support/config-fragments/autobuild/toolchain-configs.csv'
 
 main() {
     local o O opts
-    local cfg dir pkg random toolchains_dir toolchain all number mode
+    local cfg dir pkg random toolchains_csv toolchain all number mode
     local ret nb nb_skip nb_fail nb_legal nb_tc build_dir
     local -a toolchains
 
     o='hac:d:n:p:r:t:'
-    O='help,config-snippet:build-dir:package:,random:,toolchains-dir:'
+    O='help,all,config-snippet:,build-dir:,number:,package:,random:,toolchains-csv:'
     opts="$(getopt -n "${my_name}" -o "${o}" -l "${O}" -- "${@}")"
     eval set -- "${opts}"