File: prepare

package info (click to toggle)
libnginx-mod-js 0.8.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,808 kB
  • sloc: ansic: 114,096; perl: 8,447; javascript: 2,520; exp: 487; sh: 322; xml: 312; python: 181; makefile: 18
file content (39 lines) | stat: -rw-r--r-- 1,042 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
#!/bin/sh

# Copyright (C) Dmitry Volyntsev
# Copyright (C) NGINX, Inc.

njs_includes=`grep 'includes: \[[^]]*]' $njs_test \
             | sed -e 's/includes: \[//' | sed -e 's/,/ /g' | sed -e 's/\]//'`
njs_includes="assert.js sta.js $njs_includes"

njs_paths=`grep 'paths: \[[^]]*]' $njs_test \
             | sed -e 's/paths: \[//' | sed -e 's/ *, */:/g' | sed -e 's/\]//'`

njs_flags=`grep 'flags: \[[^]]*]' $njs_test \
             | sed -e 's/flags: \[//' | sed -e 's/,/ /g' | sed -e 's/\]//'`

njs_negative=`grep 'negative:' $njs_test > /dev/null \
              && grep 'phase: ' $njs_test | sed -e 's/ *phase: //' || true`

njs_async=no
for flag in $njs_flags; do
    case $flag in
        async)
            njs_async=yes
            njs_includes="compatPrint.js doneprintHandle.js $njs_includes"

        ;;
    esac
done

njs_inc=
for file in $njs_includes; do
    njs_inc="$njs_inc test/harness/$file"
done

mkdir -p `dirname $NJS_TEST_DIR/$njs_test`

cat $njs_inc $njs_test > $NJS_TEST_DIR/$njs_test

njs_total=$((njs_total+1))