Files
modules/testsuite/modulefiles/system/2.0
Xavier Delaruelle 20aada54aa Fix 'system' to run cmd through shell
system modulefile command is intended to the command passed to it trough
shell, like done on compatibility version.

So update system procedure to find correct shell on the current platform
and run command through it.

Doing so, shell commands with backticks for instance are correctly run.

Fixes #205
2018-10-20 19:51:31 +02:00

36 lines
1.1 KiB
Plaintext

#%Module1.0
##############################################################################
# Modules Revision 3.0
# Providing a flexible user environment
#
# File: system/%M%
# Revision: %I%
# First Edition: 95/12/06
# Last Mod.: %U%, %G%
#
# Authors: Jens Hamisch, Jens.Hamisch@Strawberry.COM
#
# Description: Testuite modulefile
# Command:
# Sub-Command: system
#
# Invocation: load @M@
# Result: %R{
# setenv _LMFILES_ ${_LMFILES_}:@M@/@V@
# setenv LOADEDMODULES ${LOADEDMODULES}:@P@/@M@/@V@
# setenv testsuite 123
# }R%
# Comment: %C{
# Check the 'system' command. It calls the passed shell
# command and returns its exit status.
# }C%
#
##############################################################################
setenv testsuite [system $env(TESTSUITEDIR)/systest]
setenv testsuite2 [system $env(TESTSUITEDIR)/systest 1 0 9]
setenv testsuite3 [system "$env(TESTSUITEDIR)/systest 1 0 9"]
setenv testsuite4 [system "$env(TESTSUITEDIR)/systest1 /path/to/`$env(TESTSUITEDIR)/systest1 dir`/file"]
setenv testsuite5 [system $env(TESTSUITEDIR)/systest1 /path/to/`$env(TESTSUITEDIR)/systest1 dir`/file]