File: TESTINSTALL.bat

package info (click to toggle)
modules 5.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,036 kB
  • sloc: exp: 79,659; sh: 6,142; tcl: 5,900; makefile: 1,492; ansic: 474; python: 265; csh: 202; perl: 47; ruby: 44; lisp: 13
file content (74 lines) | stat: -rw-r--r-- 1,523 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@echo off

:: installation path can be passed as argument
if [%1]==[] (
   set "installpath=%ProgramFiles%\Environment Modules"
) else (
   set "installpath=%~1"
)

:: initialize Modules if not already done
if not defined MODULES_CMD (
   call "%installpath%\init\cmd.cmd"
)

set FIND=%SYSTEMROOT%\system32\find

:: check commands exist
where /Q module.cmd
if errorlevel 1 (
    echo "'module' command not found"
    exit /b 1
)
where /Q ml.cmd
if errorlevel 1 (
    echo "'ml' command not found"
    exit /b 1
)
where /Q envml.cmd
if errorlevel 1 (
    echo "'envml' command not found"
    exit /b 1
)

module -V 2>&1 | %FIND% "Modules Release"
if errorlevel 1 (
    echo "'module -V' test failed"
    exit /b 1
)
module list 2>&1 | %FIND% "No Modulefiles Currently Loaded."
if errorlevel 1 (
    echo "'module list' test failed"
    exit /b 1
)
ml 2>&1 | %FIND% "No Modulefiles Currently Loaded."
if errorlevel 1 (
    echo "'ml' test failed"
    exit /b 1
)

call module load null

module list -t 2>&1 | %FIND% "null"
if errorlevel 1 (
    echo "'module list -t' test failed"
    exit /b 1
)
ml -t 2>&1 | %FIND% "null"
if errorlevel 1 (
    echo "'ml -t' test failed"
    exit /b 1
)

call ml -null

module list 2>&1 | %FIND% "No Modulefiles Currently Loaded."
if errorlevel 1 (
    echo "'module list' test failed"
    exit /b 1
)
ml 2>&1 | %FIND% "No Modulefiles Currently Loaded."
if errorlevel 1 (
    echo "'ml' test failed"
    exit /b 1
)