Skip to content

Commit

Permalink
Function for env print
Browse files Browse the repository at this point in the history
And add information about CPU
  • Loading branch information
fauust committed Apr 23, 2024
1 parent b66ac0c commit d4ad51c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 114 deletions.
14 changes: 2 additions & 12 deletions common_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,7 @@ def addPostTests(f_quick_build):

def getBuildFactoryPreTest(build_type="RelWithDebInfo", additional_args=""):
f_quick_build = util.BuildFactory()
f_quick_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_quick_build.addStep(printEnv())
f_quick_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -364,12 +359,7 @@ def getTests(props):
def getRpmAutobakeFactory(mtrDbPool):
## f_rpm_autobake
f_rpm_autobake = util.BuildFactory()
f_rpm_autobake.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_rpm_autobake.addStep(printEnv())
f_rpm_autobake.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down
56 changes: 8 additions & 48 deletions master-docker-nonstandard-2/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,7 @@ f_rpm_autobake = getRpmAutobakeFactory(mtrDbPool)

## f_asan_ubsan_build
f_asan_ubsan_build = util.BuildFactory()
f_asan_ubsan_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_asan_ubsan_build.addStep(printEnv())
f_asan_ubsan_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -295,12 +290,7 @@ f_asan_ubsan_build.addStep(

## f_asan_build
f_asan_build = util.BuildFactory()
f_asan_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_asan_build.addStep(printEnv())
f_asan_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -409,12 +399,7 @@ f_asan_build.addStep(

## f_msan_build
f_msan_build = util.BuildFactory()
f_msan_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_msan_build.addStep(printEnv())
f_msan_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -517,12 +502,7 @@ f_msan_build.addStep(

## f_valgrind_build
f_valgrind_build = util.BuildFactory()
f_valgrind_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_valgrind_build.addStep(printEnv())
f_valgrind_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -622,12 +602,7 @@ f_valgrind_build.addStep(

## f_big_test
f_big_test = util.BuildFactory()
f_big_test.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_big_test.addStep(printEnv())
f_big_test.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -829,12 +804,7 @@ def add_test_steps(factory, test_types):

## f_full_test
f_full_test = util.BuildFactory()
f_full_test.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_full_test.addStep(printEnv())
f_full_test.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -895,12 +865,7 @@ f_full_test.addStep(

## f_without_server
f_without_server = util.BuildFactory()
f_without_server.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_without_server.addStep(printEnv())
f_without_server.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -1115,12 +1080,7 @@ f_eco_mysqljs.addStep(

## f_bintar
f_bintar = util.BuildFactory()
f_bintar.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_bintar.addStep(printEnv())
f_bintar.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down
56 changes: 8 additions & 48 deletions master-docker-nonstandard/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,7 @@ f_rpm_autobake = getRpmAutobakeFactory(mtrDbPool)

## f_asan_ubsan_build
f_asan_ubsan_build = util.BuildFactory()
f_asan_ubsan_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_asan_ubsan_build.addStep(printEnv())
f_asan_ubsan_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -542,12 +537,7 @@ f_asan_ubsan_build.addStep(

## f_asan_build
f_asan_build = util.BuildFactory()
f_asan_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_asan_build.addStep(printEnv())
f_asan_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -656,12 +646,7 @@ f_asan_build.addStep(

## f_msan_build
f_msan_build = util.BuildFactory()
f_msan_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_msan_build.addStep(printEnv())
f_msan_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -764,12 +749,7 @@ f_msan_build.addStep(

## f_valgrind_build
f_valgrind_build = util.BuildFactory()
f_valgrind_build.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_valgrind_build.addStep(printEnv())
f_valgrind_build.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -869,12 +849,7 @@ f_valgrind_build.addStep(

## f_big_test
f_big_test = util.BuildFactory()
f_big_test.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_big_test.addStep(printEnv())
f_big_test.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -1076,12 +1051,7 @@ def add_test_steps(factory, test_types):

## f_full_test
f_full_test = util.BuildFactory()
f_full_test.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_full_test.addStep(printEnv())
f_full_test.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -1142,12 +1112,7 @@ f_full_test.addStep(

## f_without_server
f_without_server = util.BuildFactory()
f_without_server.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_without_server.addStep(printEnv())
f_without_server.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down Expand Up @@ -1362,12 +1327,7 @@ f_eco_mysqljs.addStep(

## f_bintar
f_bintar = util.BuildFactory()
f_bintar.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_bintar.addStep(printEnv())
f_bintar.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down
7 changes: 1 addition & 6 deletions master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,7 @@ f_rpm_autobake = getRpmAutobakeFactory(mtrDbPool)

## f_deb_autobake
f_deb_autobake = util.BuildFactory()
f_deb_autobake.addStep(
steps.ShellCommand(
name="Environment details",
command=["bash", "-c", "date -u && uname -a && ulimit -a"],
)
)
f_deb_autobake.addStep(printEnv())
f_deb_autobake.addStep(
steps.SetProperty(
property="dockerfile",
Expand Down
18 changes: 18 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,24 @@ def createWorker(
return ((base_name, name + worker_name_suffix), worker_instance)


def printEnv():
return ShellCommand(
name="Environment details",
command=[
"bash",
"-c",
util.Interpolate(
"""
date -u
uname -a
ulimit -a
command -v lscpu >/dev/null && lscpu
"""
),
],
)


def getSourceTarball():
return ShellCommand(
name="get_tarball",
Expand Down

0 comments on commit d4ad51c

Please sign in to comment.