summaryrefslogtreecommitdiff
path: root/infra/commands
diff options
context:
space:
mode:
authorDmitriy Nikiforov <d.nikiforov@samsung.com>2017-10-27 19:53:56 +0300
committerMaria Guseva <m.guseva@samsung.com>2017-11-01 16:36:46 +0000
commit77e32b22bcb2b3a5f45bdc685efadd695c569bb2 (patch)
tree146a4f6221d00e21f5cbd5e2cbdc765337e4b2c6 /infra/commands
parentfc70a555c2f54abe0b1faf35c1e5c53bc948847c (diff)
downloadfuzz-testing-77e32b22bcb2b3a5f45bdc685efadd695c569bb2.tar.gz
fuzz-testing-77e32b22bcb2b3a5f45bdc685efadd695c569bb2.tar.bz2
fuzz-testing-77e32b22bcb2b3a5f45bdc685efadd695c569bb2.zip
Archive target sources in 'build' command
Change-Id: I8d884b6c8e7e38994435f94d7f77b4f8e8150e03
Diffstat (limited to 'infra/commands')
-rwxr-xr-xinfra/commands/build.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/infra/commands/build.sh b/infra/commands/build.sh
index 1a7142b..a2c158b 100755
--- a/infra/commands/build.sh
+++ b/infra/commands/build.sh
@@ -169,6 +169,7 @@ build_target_dir="${BUILD_ARTIFACTS_DIR}/${project_name}/${ARCH}/target"
build_dict_dir="${BUILD_ARTIFACTS_DIR}/${project_name}/dicts"
build_options_dir="${BUILD_ARTIFACTS_DIR}/${project_name}/options"
build_deps_dir="${BUILD_ARTIFACTS_DIR}/${project_name}/deps"
+build_target_source_dir="${BUILD_ARTIFACTS_DIR}/${project_name}/target_source"
gbs_build_root="${GBS_ROOT}/local/BUILD-ROOTS/scratch.${ARCH}.0"
rpm_root="${GBS_ROOT}/local/repos/${GBS_PROFILE}/${ARCH}/RPMS"
@@ -189,6 +190,7 @@ echo "Building ${project_dir}:"
# clean previously built targets
clean_dir "${build_target_dir}"
+clean_dir "${build_target_source_dir}"
clean_dir "${build_options_dir}"
clean_dir "${build_deps_dir}"
clean_dir "${build_dict_dir}"
@@ -340,5 +342,8 @@ for dep in "${deps[@]}"; do
fi
done
+# archive target sources
+tar -zcf "${build_target_source_dir}/${project_name}_src.tar.gz" -C "${gbs_build_root}" "${chroot_target_dir:1}"
+
echo "Successfully built ${project_dir}!"
echo "Artifacts location: ${BUILD_ARTIFACTS_DIR}/${project_name}"