forked from openhwgroup/force-riscv
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup
executable file
·51 lines (43 loc) · 1.44 KB
/
setup
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
#!/usr/bin/env bash
#
# Copyright (C) [2020] Futurewei Technologies, Inc.
#
# FORCE-RISCV is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES
# OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
# NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the License for the specific language governing permissions and
# limitations under the License.
#
gcc_req="5.1"
python_req="3.6.1"
. ./setenv.bash
pause() {
echo
read -r -sn1 -p "$1 -- Press Enter to continue or Ctrl-C to quit"
echo
}
gcc_ver=$(g++ --version|grep g++|awk '{print $NF}')
if ! ( ./version_chk.py "$gcc_ver" "$gcc_req" ); then
echo g++ version needs to be >= "$gcc_req"
pause "g++ version may need updating."
fi
python_ver=$(python3 --version|grep Python|awk '{print $NF}')
if ! ( ./version_chk.py "$python_ver" "$python_req" ); then
echo python version needs to be >= "$python_req"
pause "python version may need updating."
fi
echo Current environment:
echo FORCE_CC="$FORCE_CC"
echo FORCE_PYTHON_VER="$FORCE_PYTHON_VER"
echo FORCE_PYTHON_INC="$FORCE_PYTHON_INC"
echo FORCE_PYTHON_LIB="$FORCE_PYTHON_LIB"
make -j
make -j tests
./utils/regression/master_run.py
./utils/regression/unit_tests.py