This changes run_make_test.pl to set the $port_type to 'VMS-DCL' or default to 'UNIX' based on how the test harness is run on VMS as was previously discussed with Paul.

This also fixes the run_make_tests.com to work with a search list.

A search list on VMS is similar to an overlay file system.

Regards,
-John
>From cc3c5d012bdcd120e1c0f0b2e63e46d6575f237b Mon Sep 17 00:00:00 2001
From: John Malmberg <wb8...@qsl.net>
Date: Mon, 6 Oct 2014 21:46:34 -0500
Subject: [PATCH] VMS run_make_tests fixes.

Fixes for running tests on VMS.

The changes for the test scripts will follow in groups to be determined.

* run_make_tests.pl: set $port_type to be 'VMS-DCL' when the test are
  run from the VMS DCL Interpreter.  When the tests are run from GNV on VMS,
  the $port_type will be 'UNIX'.

* run_make_tests.com: VMS search list support.  This is needed for using
  a search list such as prj_root = lcl_root:,vms_root:,src_root: for
  building and testing.
---
 tests/run_make_tests.com |    6 +++---
 tests/run_make_tests.pl  |    7 +++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/tests/run_make_tests.com b/tests/run_make_tests.com
index 2f17f7f..2b620cf 100755
--- a/tests/run_make_tests.com
+++ b/tests/run_make_tests.com
@@ -238,18 +238,18 @@ $!
 $ if no_gnv .or. no_perl then exit 44
 $!
 $!
-$ make := $bin:make.exe
 $ default = f$environment("DEFAULT")
+$ default_dev = f$element(0, ":", default) + ":"
 $ this = f$environment("PROCEDURE")
 $ on error then goto all_error
-$ set default 'f$parse(this,,,"DEVICE")''f$parse(this,,,"DIRECTORY")'
+$ set default 'default_dev''f$parse(this,,,"DIRECTORY")'
 $!
 $! Need to make sure that the config-flags.pm exists.
 $ if f$search("config-flags.pm") .eqs. ""
 $ then
 $   @config_flags_pm.com
 $ endif
-$ define/user bin 'default',gnv$gnu:[bin]
+$ define/user bin 'default_dev'[-],gnv$gnu:[bin]
 $ define/user decc$filename_unix_noversion enable
 $ define/user decc$filename_unix_report enable
 $ define/user decc$readdir_dropdotnotype enable
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl
index 9468fab..1145c73 100644
--- a/tests/run_make_tests.pl
+++ b/tests/run_make_tests.pl
@@ -359,6 +359,12 @@ sub set_more_defaults
    elsif ($osname =~ m%OS/2%) {
      $port_type = 'OS/2';
    }
+
+   # VMS has a GNV Unix mode or a DCL mode.
+   # The SHELL environment variable should not be defined in VMS-DCL mode.
+   elsif ($osname eq 'VMS' && !defined $ENV{"SHELL"}) {
+     $port_type = 'VMS-DCL';
+   }
    # Everything else, right now, is UNIX.  Note that we should integrate
    # the VOS support into this as well and get rid of $vos; we'll do
    # that next time.
@@ -377,6 +383,7 @@ sub set_more_defaults
    # Find the full pathname of Make.  For DOS systems this is more
    # complicated, so we ask make itself.
    if ($osname eq 'VMS') {
+     $port_type = 'VMS-DCL' unless defined $ENV{"SHELL"};
      # On VMS pre-setup make to be found with simply 'make'.
      $make_path = 'make';
    } else {
-- 
1.7.9

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to