-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuildenv
More file actions
79 lines (68 loc) · 2.4 KB
/
buildenv
File metadata and controls
79 lines (68 loc) · 2.4 KB
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
# Update bump details accordingly. Use bump check to confirm.
# bump: redis-version /REDIS_VERSION="(.*)"/ gitrefs:https://github.com/redis/redis.git|re:/([\d]+.[\d]+.[\d]+)/$1/|sort
REDIS_VERSION="8.2.3" # Specify a stable release
export ZOPEN_STABLE_TAG="${REDIS_VERSION}"
export ZOPEN_STABLE_URL="https://github.com/redis/redis.git"
export ZOPEN_STABLE_DEPS="tcl tcltls make openssl which pkgconfig check_python coreutils bash findutils grep"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_CATEGORIES="database"
export ZOPEN_CONFIGURE="skip"
export ZOPEN_CHECK="../test_run.sh"
export ZOPEN_CHECK_OPTS="skip"
export ZOPEN_INSTALL_OPTS="install PREFIX=\${ZOPEN_INSTALL_DIR}"
export ZOPEN_COMP="CLANG"
export ZOPEN_MAKE="zopen_make"
export ZOPEN_SYSTEM_PREREQ="zos25"
export USE_ZOSLIB_LOCALE=1
zopen_make() {
cd deps; make "$@" BUILD_TLS=yes fast_float fpconv hdr_histogram hiredis linenoise lua; cd -
make "$@" BUILD_TLS=yes
}
zopen_pre_patch()
{
export CFLAGS="$CFLAGS $CPPFLAGS -mzos-target=zosv2r5 -D__XPLAT -D__thread= -DMAP_ANON=0 -D_UNIX03_SOURCE=1"
export CXXFLAGS="$CXXFLAGS $CPPFLAGS -mzos-target=zosv2r5 -D__XPLAT -D__thread= -DMAP_ANON=0 -D_UNIX03_SOURCE=1 -std=c++11"
}
zopen_post_install() {
ZOPEN_INSTALL_DIR=$1
echo $ZOPEN_INSTALL_DIR
# Ensure the target directory exists
mkdir -p $ZOPEN_INSTALL_DIR/etc
cp -f ./redis.conf $ZOPEN_INSTALL_DIR/etc
if [ ! -f "$ZOPEN_INSTALL_DIR/etc/redis.conf" ]; then
printError "redis.conf not copied"
fi
}
zopen_check_results()
{
chk="../test_run.log"
# Counting the actual errors and passes based on log patterns
actualErrors=$(grep -o "EXCEPTION IN: " "$chk" | wc -l)
actualPass=$(grep -o "LOG FOR: " "$chk" | wc -l)
# Generating the timestamp
timestamp=$(date +%Y%m%d_%H%M%S)
# Defining the new log path
new_log="../log.STABLE/test_run_${timestamp}.log"
# Moving test_run.log to the new location
if [[ -f "$chk" ]]; then
mv "$chk" "$new_log"
chk="$new_log"
else
echo "Warning: test_run.log not found."
fi
# Calculating the total tests and expected failures
totalTests=$((actualPass + actualErrors))
expectedErrors="2"
cat <<ZZ
actualPassed:$actualPass
actualFailures:$actualErrors
totalTests:$totalTests
expectedFailures:$expectedErrors
ZZ
}
zopen_get_version()
{
# Modify to echo the version of your tool/library
# Rather than hardcoding the version, obtain the version by running the tool/library
echo "1.0.0"
}