/test-definitions/blob/master/auto-test/linpack/linpack.sh
2018-01-23 08:23
417 查看
#!/bin/sh -e set -x cd ../../utils . ./sh-test-lib . ./sys_info.sh cd - ARRAY_SIZE="200" # Run Test. #detect_abi wget http://www.netlib.org/benchmark/linpackc.new print_info $? wget-linpackc #将下载linpackc.new 改成linpackc.c mv linpackc.new linpack.c #为编译c源文件,不同的发行版需要安装不同的包 case $distro in "centos") yum install glibc-static -y yum install gcc -y print_info $? install-package ;; "ubuntu|debian") apt-get install gcc -y apt-get install buid-essential -y apt-get install glibc-source -y print_info $? install-package esac #编译生成可执行文件 gcc -O3 -static -o linpack linpack.c -lm #lm 表示link libm print_info $? gcc-linpack #执行文件,并将log 重定向到文件中 # shellcheck disable=SC2154 ( echo "${ARRAY_SIZE}"; echo "q" ) \ | ./linpack 2>&1 \ | tee -a linpack.log print_info $? run-linpack # Parse output. #根据name 查找到这个进程并杀掉。其实可以用pkill代替 count=`ps -aux | grep linpack | wc -l` if [ $count -gt 0 ]; then kill -9 $(pidof linpack) print_info $? kill-linpack fi #删除前面安装的包 case $distro in "centos") yum remove glibc-static -y yum remove gcc -y print_info $? remove-package ;; "ubuntu") apt-get remove gcc -y apt-get remove glibc-source -y apt-get remove buid-essential -y print_info $? remove-package ;; esac
相关文章推荐
- /test-definitions/blob/master/auto-test/blktrace/blktrace.sh
- /test-definitions/blob/master/auto-test/crypto/crypto.sh
- test-definitions/blob/master/auto-test/iperf/iperf.sh
- test-definitions/blob/master/auto-test/dsdbench/dsdbench.sh
- test-definitions/blob/master/auto-test/isolate-task/isolate-task-verify.sh
- test-definitions/blob/master/auto-test/dsdbench/dsdbench.sh
- test-definitions/blob/master/auto-test/24h-stress-test/24h-stress-test.sh
- test-definitions/blob/master/auto-test/dstat/dstat.sh
- test-definitions/blob/master/auto-test/alisql/alisql.sh
- test-definitions/blob/master/auto-test/etcd/etcd.sh
- test-definitions/blob/master/auto-test/bazel/bazel.sh
- test-definitions/blob/master/auto-test/ftp/ftp.sh
- test-definitions/blob/master/auto-test/bigdata/bigdata.sh
- test-definitions/blob/master/auto-test/go-bindata/go-bindata.sh
- test-definitions/blob/master/auto-test/gprof/gprof.sh
- test-definitions/blob/master/auto-test/blogbench/blogbench.sh
- test-definitions/blob/master/auto-test/hhvm/hhvm.sh
- test-definitions/blob/master/auto-test/kernel-compilation/kernel-compilation.sh
- test-definitions/blob/master/auto-test/boost/boost.sh
- test-definitions/blob/master/auto-test/cockroach/cockroachInsecureTest.sh