~nunit-core/nunitv2/2.6

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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/bin/sh
# build - Builds and tests NUnit

NANT="tools/nant-0.90/bin/NAnt.exe"
options="-f:scripts/nunit.build.targets"
config=""
runtime=""
clean=""
commands=""
passthru=false

for arg in $@
do
  if [ $passthru = true ]
  then
    commands="$commands $arg"
    continue
  fi

  case "$arg" in
    debug|release)
      config="$arg"
      ;;

    mono-1.0|1.0)
      runtime="mono-1.0"
      ;;

    mono-2.0|2.0)
      runtime="mono-2.0"
      ;;

    mono-3.5|3.5)
      runtime="mono-3.5"
      ;;

    mono-4.0|4.0)
      runtime="mono-4.0"
      ;;

    clean)
      clean="clean"
      ;;

    clean-all)
      clean="clean-all"
      ;;

    samples|tools|all)
      commands="$commands build-$arg"
      ;;

    test|gui-test|gen-syntax)
      commands="$commands $arg"
      ;;

    -h|--help)
      echo "Builds and tests NUnit"
      echo
      echo "usage: BUILD [option [...] ]"
      echo
      echo "Options may be any of the following, in any order..."
      echo
      echo "  debug          Builds debug configuration (default)"
      echo "  release        Builds release configuration"
      echo
      echo "  mono-4.0, 4.0  Builds using Mono 4.0 profile (future)"
      echo "  mono-3.5, 3.5  Builds using Mono 3.5 profile (default)"
      echo "  mono-2.0, 2.0  Builds using Mono 2.0 profile"
      echo "  mono-1.0, 1.0  Builds using Mono 1.0 profile"
      echo
      echo "  clean          Cleans the output directory before building"
      echo "  clean-all      Removes output directories for all runtimes"
      echo
      echo "  samples        Builds the NUnit samples"
      echo "  tools          Builds the NUnit tools"
      echo
      echo "  test           Runs tests for a build using the console runner"
      echo "  gui-test       Runs tests for a build using the NUnit gui"
      echo
      echo "  -h, --help     Displays this help message"
      echo
      echo "Notes:"
      echo
      echo "  1. The default Mono profile to be used is selected automatically"
      echo "     by the NAnt script based on the version of Mono installed"
      echo
      echo "  2. When building under the 3.5 or higher profile, the 2.0"
      echo "     runtime version is targeted for NUnit itself. Tests use"
      echo "     the specified higher level framework."
      echo   
      exit;
      ;;

    --)
      passthru=true
      ;;

    *)
      echo "Invalid argument: $arg"
      echo
      echo "Use $0 -h for more info"
      echo
      exit;
      ;;
  esac
done

if [ "$commands" = "" ]
then
  commands="build"
fi

if [ "$config" != "" ]
then
  options="$options -D:build.config=$config"
fi

if [ "$runtime" != "" ]
then
  options="$options -D:runtime.config=$runtime"
fi

exec mono "$NANT" $options $clean $commands