Mercurial > hg > toybox
view scripts/test.sh @ 953:13916d161ec0
xzcat: remove XZ_(PREALLOC|SINGLE), inline xz_dec_bcj_create
Because we only use XZ_DYNALLOC, there's a bunch of dead code.
This patch removes the #ifdef's and if()s associated with support for
multiple modes.
single_call was only used to store the mode; it is no longer needed.
A little bit of reorganization was needed to reduce the number of prototypes.
Documentation associated with dead code was dropped.
There are still some relics of multiple modes in the continued presence
of "XZ_DYNALLOC" and xz_mode.
Additionally, I inlined xz_dec_bcj_create; it was called once.
This loses about 125 lines, mostly comments.
author | Isaac Dunham <idunham@lavabit.com> |
---|---|
date | Wed, 17 Jul 2013 17:25:07 -0500 |
parents | b9ea00fffee5 |
children | 4948a942de49 |
line wrap: on
line source
#!/bin/bash [ -z "$TOPDIR" ] && TOPDIR="$(pwd)" rm -rf testdir mkdir -p testdir if [ -z "$TEST_HOST" ] then make install_flat PREFIX=testdir || exit 1 fi cd testdir PATH="$(pwd):$PATH" . "$TOPDIR"/scripts/test/testing.sh [ -f "$TOPDIR/generated/config.h" ] && export OPTIONFLAGS=:$(echo $(sed -nr 's/^#define CFG_(.*) 1/\1/p' "$TOPDIR/generated/config.h") | sed 's/ /:/g') if [ $# -ne 0 ] then for i in "$@" do ln -sf toybox $i . "$TOPDIR"/scripts/test/$i.test done else for i in "$TOPDIR"/scripts/test/*.test do CMDNAME="$(echo "$i" | sed 's@.*/\(.*\)\.test@\1@')" if [ -h $CMDNAME ] || [ ! -z "$TEST_HOST" ] then . $i else echo "$CMDNAME disabled" fi done fi