From a26ea21bba35f0118c7d5c4414c6f6c7fa74b16b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 29 Dec 2013 19:38:09 +0200 Subject: Enable compiling extensions on VMS. --- test/ChangeLog | 4 ++++ test/fts.awk | 24 +++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/ChangeLog b/test/ChangeLog index 378c6ae3..dd73cbc6 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2013-12-29 John E. Malmberg + + * fts.awk: Adjust for VMS. + 2013-12-10 Arnold D. Robbins * Makefile.am: Remove instances of "" that were incorrect. diff --git a/test/fts.awk b/test/fts.awk index a1b49cbd..d2e55cab 100644 --- a/test/fts.awk +++ b/test/fts.awk @@ -3,8 +3,19 @@ BEGIN { Level = 0 - system("rm -fr d1 d2") - system("mkdir d1 d2 ; touch d1/f1 d1/f2 d2/f1 d2/f2") + os = "" + if (ENVIRON["AWKLIBPATH"] == "sys$disk:[-]") { + os = "VMS" + system("create/dir/prot=o:rwed [.d1]") + system("create/dir/prot=o:rwed [.d2]") + system("copy fts.awk [.d1]f1") + system("copy fts.awk [.d1]f2") + system("copy fts.awk [.d2]f1") + system("copy fts.awk [.d2]f2") + } else { + system("rm -fr d1 d2") + system("mkdir d1 d2 ; touch d1/f1 d1/f2 d2/f1 d2/f2") + } pathlist[1] = "d1" pathlist[2] = "d2" flags = FTS_PHYSICAL @@ -19,7 +30,14 @@ BEGIN { traverse(data2) close(output) - system("rm -fr d1 d2") + if (os == "VMS") { + system("delete [.d1]*.*;*") + system("delete [.d2]*.*;*") + system("delete d1.dir;*") + system("delete d2.dir;*") + } else { + system("rm -fr d1 d2") + } } function indent( i) -- cgit v1.2.3 From dad5f25058c4ecf69ebe4543a13281d3f28c69bc Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 30 Dec 2013 21:52:45 +0200 Subject: Build and test dynamic extensions on VMS. Documented too. --- test/ChangeLog | 1 + test/fts.awk | 7 +++++++ test/rwarray.awk | 25 ++++++++++++++++--------- 3 files changed, 24 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/ChangeLog b/test/ChangeLog index dd73cbc6..cc81d9a4 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,6 +1,7 @@ 2013-12-29 John E. Malmberg * fts.awk: Adjust for VMS. + * rwarray.awk: Adjust for VMS. 2013-12-10 Arnold D. Robbins diff --git a/test/fts.awk b/test/fts.awk index d2e55cab..70af560f 100644 --- a/test/fts.awk +++ b/test/fts.awk @@ -114,6 +114,13 @@ function process(pathname, data_array, for (i in stat_data) data_array[pathname]["."]["stat"][i] = stat_data[i] + os = "" + if (ENVIRON["AWKLIBPATH"] == "sys$disk:[-]") { + os = "VMS" + # Command in next section not valid on VMS. + return + } + command = ("ls -f " pathname) while ((command | getline direntry) > 0) { if (direntry == "." || direntry == "..") diff --git a/test/rwarray.awk b/test/rwarray.awk index 5d1b7e9d..0cb214ee 100644 --- a/test/rwarray.awk +++ b/test/rwarray.awk @@ -21,13 +21,20 @@ BEGIN { printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "new.out" close("new.out"); - ret = system("cmp orig.out new.out") - - if (ret == 0) - print "old and new are equal - GOOD" - else - print "old and new are not equal - BAD" - - if (ret == 0 && !("KEEPIT" in ENVIRON)) - system("rm -f orig.bin orig.out new.out") + os = "" + if (ENVIRON["AWKLIBPATH"] == "sys$disk:[-]") { + os = "VMS" + # return status from system() on VMS can not be used here + } + if (os != "VMS") { + ret = system("cmp orig.out new.out") + + if (ret == 0) + print "old and new are equal - GOOD" + else + print "old and new are not equal - BAD" + + if (ret == 0 && !("KEEPIT" in ENVIRON)) + system("rm -f orig.bin orig.out new.out") + } } -- cgit v1.2.3