~hww3/caudium

ref: 93d5a75fba08db71b832716377276978cdd7888d caudium/tools/xenofarm.sh -rwxr-xr-x 3.3 KiB
93d5a75fWilliam Welliver storage: method "None" was missing stop function. should fix error on shutdown 1 year, 1 month ago
                                                                                
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
127
128
129
#! /bin/sh

# $Id: xenofarm.sh,v 1.30 2008/03/08 00:20:29 grubba Exp $
# This file scripts the xenofarm actions and creates a result package
# to send back.
#
# shamelessly ripped from the pike source tree for our own purposes.
#
 
log() {
  echo $1 | tee -a xenofarm_result/mainlog.txt
}

log_start() {
  log "BEGIN $1"
  TZ=GMT date >> xenofarm_result/mainlog.txt
}

log_end() {
  LASTERR=$1
  if [ "$1" = "0" ] ; then
    log "PASS"
  else
    log "FAIL"
  fi
  TZ=GMT date >> xenofarm_result/mainlog.txt
}

xenofarm_build() {
  log_start configure
  ./configure $CONFIGURE_ARGS >xenofarm_result/configlog.txt 2>&1
  log_end 0
  [ $LASTERR = 0 ] || return 1
  log_start compile
  $MAKE $MAKE_ARGS > xenofarm_result/compilelog.txt 2>&1
  log_end $?
  [ $LASTERR = 0 ] || return 1
}

xenofarm_post_build() {
  POST_RESULT=0
  log_start features
  pike -x features > xenofarm_result/features.txt 2>/dev/null
  log_end $?
#  [ $LASTERR = 0 ] || return 1
#  log_start benchmark
#  $MAKE benchmark > xenofarm_result/benchmark.txt 2>&1
#  log_end $?
  POST_RESULT=$LASTERR

  log_start verify
  # Note: verify and valgrind_verify perform the same actions
  #       if not compiled --with-valgrind.
#  $MAKE METATARGET=valgrind_verify TESTARGS="-a -T -F" > \
#    xenofarm_result/verifylog.txt 2>&1
  make verify > xenofarm_result/verifylog.txt 2>&1
  log_end $?
  [ $LASTERR = 0 ] || return 1
  
#  log_start export
#  $MAKE bin_export > xenofarm_result/exportlog.txt 2>&1
#  log_end $?
#  [ $LASTERR = 0 ] || return 1
  return $POST_RESULT
}


# main code

LC_CTYPE=C
export LC_CTYPE
log "FORMAT 2"

log_start build
xenofarm_build
log_end $?

if [ $LASTERR = 0 ]; then
  log_start post_build
  xenofarm_post_build
  log_end $?
  else :
fi

log_start response_assembly
  # Basic stuff
  cp buildid.txt xenofarm_result/
  # Configuration
  (
    cd "$BUILDDIR"
    for f in `find . -name config.log -type f | sort`; do
      echo
      echo '###################################################'
      echo '##' `dirname "$f"`
      echo
      cat "$f"
    done
  ) > xenofarm_result/configlogs.txt
  cp "$BUILDDIR/config.info" xenofarm_result/configinfo.txt || /bin/true
  cp "$BUILDDIR/config.cache" xenofarm_result/configcache.txt || /bin/true;
  # Compilation
  if test "`find $BUILDDIR -name '*.fail' -print`" = ""; then :; else
    (
      cd "$BUILDDIR"
      echo
      echo "The following file(s) failed to compile with full optimization."
      echo "This may affect performance negatively."
      find . -name '*.fail' -print | sed -e 's/\.fail$$//' -e 's/^/	/'
    ) >xenofarm_result/compilation_failure.txt
  fi
  # Installation
#  cp "$BUILDDIR/dumpmodule.log" xenofarm_result/dumplog.txt || /bin/true
  # Testing
#  if test ! -f "xenofarm_result/exportlog.txt"; then
#    cp "$BUILDDIR/testsuite" xenofarm_result/testsuite.txt || /bin/true;
#  fi
  # Core files
#  find . -name "core" -exec \
#    gdb --batch --nx --command=bin/xenofarm_gdb_cmd "$BUILDDIR/pike" {} >> \
#       xenofarm_result/_core.txt ";"
#  find . -name "*.core" -exec \
#    gdb --batch --nx --command=bin/xenofarm_gdb_cmd "$BUILDDIR/pike" {} >> \
#      xenofarm_result/_core.txt ";"
#  find . -name "core.*" -exec \
#    gdb --batch --nx --command=bin/xenofarm_gdb_cmd "$BUILDDIR/pike" {} >> \
#      xenofarm_result/_core.txt ";"
log_end $?

log "END"