Diff of /make-target-contrib.sh [9c3a95] .. [25c176] Maximize Restore

  Switch to unified view

a/make-target-contrib.sh b/make-target-contrib.sh
...
...
25
. output/build-config
25
. output/build-config
26
26
27
. ./sbcl-pwd.sh
27
. ./sbcl-pwd.sh
28
sbcl_pwd
28
sbcl_pwd
29
29
30
SBCL_HOME="$SBCL_PWD/contrib"
30
SBCL_HOME="$SBCL_PWD/obj/sbcl-home"
31
export SBCL_HOME
31
export SBCL_HOME SBCL_PWD
32
if [ "$OSTYPE" = "cygwin" ] ; then
32
if [ "$OSTYPE" = "cygwin" ] ; then
33
    SBCL_PWD=`echo $SBCL_PWD | sed s/\ /\\\\\\\\\ /g`
33
    SBCL_PWD=`echo $SBCL_PWD | sed s/\ /\\\\\\\\\ /g`
34
fi
34
fi
35
35
36
SBCL="$SBCL_PWD/src/runtime/sbcl --noinform --core $SBCL_PWD/output/sbcl.core \
36
SBCL="$SBCL_PWD/src/runtime/sbcl --noinform --core $SBCL_PWD/output/sbcl.core \
...
...
41
# deleting things here lets us not worry about interaction with stale
41
# deleting things here lets us not worry about interaction with stale
42
# fasls.  This is not good, but is better than :FORCE on each asdf
42
# fasls.  This is not good, but is better than :FORCE on each asdf
43
# operation, because that causes multiple builds of base systems such
43
# operation, because that causes multiple builds of base systems such
44
# as SB-RT and SB-GROVEL, but FIXME: there's probably a better
44
# as SB-RT and SB-GROVEL, but FIXME: there's probably a better
45
# solution.  -- CSR, 2003-05-30
45
# solution.  -- CSR, 2003-05-30
46
46
if [ -z "$DONT_CLEAN_SBCL_CONTRIB" ] ; then
47
  find contrib/ obj/asdf-cache/ obj/sbcl-home/contrib/ \
47
find contrib/ \( -name '*.fasl' -o \
48
    \( -name '*.fasl' -o \
48
                 -name '*.FASL' -o \
49
       -name '*.FASL' -o \
49
                 -name 'foo.c' -o \
50
       -name 'foo.c' -o \
50
                 -name 'FOO.C' -o \
51
       -name 'FOO.C' -o \
51
                 -name 'a.out' -o \
52
       -name 'a.out' -o \
52
                 -name 'A.OUT' -o \
53
       -name 'A.OUT' -o \
53
                 -name 'alien.so' -o \
54
       -name 'alien.so' -o \
54
                 -name 'ALIEN.SO' -o \
55
       -name 'ALIEN.SO' -o \
55
                 -name '*.o' -o \
56
       -name '*.o' -o \
56
                 -name '*.O' \) \
57
       -name '*.O' \) \
57
  -print | xargs rm -f
58
    -print | xargs rm -f
59
fi
58
60
59
find output -name 'building-contrib.*' -print | xargs rm -f
61
find output -name 'building-contrib.*' -print | xargs rm -f
60
62
61
# Ignore all source registries.
63
# Ignore all source registries.
62
CL_SOURCE_REGISTRY='(:source-registry :ignore-inherited-configuration)'
63
export CL_SOURCE_REGISTRY
64
65
if [ -z "$*" ]; then
64
if [ -z "$*" ]; then
66
    contribs_to_build=contrib/*
65
    contribs_to_build="`cd contrib ; echo *`"
67
else
66
else
68
    for name in $*; do
67
    contribs_to_build="$*"
69
        contribs_to_build="contrib/$name $contribs_to_build"
70
    done
71
fi
68
fi
72
69
73
for i in $contribs_to_build; do
70
for i in $contribs_to_build; do
74
    test -d $i && test -f $i/Makefile || continue;
71
    test -d contrib/$i && test -f contrib/$i/Makefile || continue;
75
    # export INSTALL_DIR=$SBCL_HOME/`basename $i `
72
    test -f contrib/$i/test-passed && rm contrib/$i/test-passed # remove old convention
76
    test -f $i/test-passed && rm $i/test-passed
73
    test -f obj/asdf-cache/$i/test-passed.test-report && rm obj/asdf-cache/$i/test-passed.test-report
74
    mkdir -p obj/asdf-cache/$i/
77
    # hack to get exit codes right.
75
    # hack to get exit codes right.
78
    if $GNUMAKE -C $i test 2>&1 && touch $i/test-passed ; then
76
    if $GNUMAKE -C contrib/$i test < /dev/null 2>&1 && touch obj/asdf-cache/$i/test-passed.test-report ; then
79
    :
77
    :
80
    else
78
    else
81
    exit $?
79
    exit $?
82
    fi | tee output/building-contrib.`basename $i` 
80
    fi | tee output/building-contrib.`basename $i` 
83
done
81
done
84
82
85
# Otherwise report expected failures:
83
# Otherwise report expected failures:
86
HEADER_HAS_BEEN_PRINTED=false
84
HEADER_HAS_BEEN_PRINTED=false
87
for dir in contrib/*; do
85
for dir in `cd obj/asdf-cache/ ; echo *`; do
88
  f="$dir/test-passed"
86
  f="obj/asdf-cache/$dir/test-passed.test-report"
89
  if test -f "$f" && grep -i fail "$f" >/dev/null; then
87
  if test -f "$f" && grep -i fail "$f" >/dev/null; then
90
      if ! $HEADER_HAS_BEEN_PRINTED; then
88
      if ! $HEADER_HAS_BEEN_PRINTED; then
91
          cat <<EOF
89
          cat <<EOF
92
90
93
Note: Test suite failures which are expected for this combination of
91
Note: Test suite failures which are expected for this combination of
94
platform and features have been ignored:
92
platform and features have been ignored:
95
EOF
93
EOF
96
          HEADER_HAS_BEEN_PRINTED=true
94
          HEADER_HAS_BEEN_PRINTED=true
97
      fi
95
      fi
98
      echo "  $dir"
96
      echo "  contrib/$dir"
99
      (unset IFS; while read line; do echo "    $line"; done <"$f")
97
      (unset IFS; while read line; do echo "    $line"; done <"$f")
100
  fi
98
  fi
101
done
99
done
102
100
103
# Sometimes people used to see the "No tests failed." output from the last
101
# Sometimes people used to see the "No tests failed." output from the last
104
# DEFTEST in contrib self-tests and think that's all that is. So...
102
# DEFTEST in contrib self-tests and think that's all that is. So...
105
HEADER_HAS_BEEN_PRINTED=false
103
HEADER_HAS_BEEN_PRINTED=false
106
for dir in contrib/*
104
for dir in `cd contrib ; echo *`
107
do
105
do
108
  if [ -d "$dir" -a -f "$dir/Makefile" -a ! -f "$dir/test-passed" ]; then
106
  if [ -d "contrib/$dir" -a -f "contrib/$dir/Makefile" -a ! -f "obj/asdf-cache/$dir/test-passed.test-report" ]; then
109
      if $HEADER_HAS_BEEN_PRINTED; then
107
      if $HEADER_HAS_BEEN_PRINTED; then
110
          echo > /dev/null
108
          echo > /dev/null
111
      else
109
      else
112
          cat <<EOF
110
          cat <<EOF
113
111
114
WARNING! Some of the contrib modules did not build successfully or pass
112
WARNING! Some of the contrib modules did not build successfully or pass
115
their self-tests. Failed contribs:"
113
their self-tests. Failed contribs:"
116
EOF
114
EOF
117
          HEADER_HAS_BEEN_PRINTED=true
115
          HEADER_HAS_BEEN_PRINTED=true
118
      fi
116
      fi
119
      echo "  `basename $dir`"
117
      echo "  $dir"
120
  fi
118
  fi
121
done
119
done
122
120
123
if [ $HEADER_HAS_BEEN_PRINTED = true ]; then
121
if [ $HEADER_HAS_BEEN_PRINTED = true ]; then
124
  exit 1
122
  exit 1