diff options
author | Martin Peres <martin.peres@linux.intel.com> | 2017-10-09 19:24:22 +0300 |
---|---|---|
committer | Martin Peres <martin.peres@linux.intel.com> | 2017-10-09 19:26:51 +0300 |
commit | 5d170f6c21d24e6c1924dba471616616e5003971 (patch) | |
tree | 89239f63b999d2aa2415ede27ac5cc859f68cda9 | |
parent | c0711aef8a21d431e758de37dfc86d7704fc8218 (diff) |
profile: add a new IGT profile
-rw-r--r-- | profiles.d/igt/conf.d/compile.conf | 19 | ||||
-rw-r--r-- | profiles.d/igt/profile | 52 | ||||
-rw-r--r-- | tests.d/piglit/igt.test | 6 | ||||
-rw-r--r-- | user_parameters.sh.sample | 1 |
4 files changed, 76 insertions, 2 deletions
diff --git a/profiles.d/igt/conf.d/compile.conf b/profiles.d/igt/conf.d/compile.conf new file mode 100644 index 0000000..632c473 --- /dev/null +++ b/profiles.d/igt/conf.d/compile.conf @@ -0,0 +1,19 @@ +source "$ezBenchDir/profiles.d/utils/common.sh" + +function compile_pre_hook() { + # Accessible variables + # $commit [RO]: SHA1 id of the current commit + # $commitName [RO]: Name of the commit + + gui_start || exit 60 + x_show_debug_info_start +} + +function compile_post_hook() { + # Accessible variables + # $commit [RO]: SHA1 id of the current commit + # $commitName [RO]: Name of the commit + + x_show_debug_info_stop + gui_stop +} diff --git a/profiles.d/igt/profile b/profiles.d/igt/profile new file mode 100644 index 0000000..a6412e0 --- /dev/null +++ b/profiles.d/igt/profile @@ -0,0 +1,52 @@ +source "$ezBenchDir/profiles.d/utils/common.sh" +source "$ezBenchDir/profiles.d/utils/git-repo.sh" +source "$ezBenchDir/profiles.d/utils/auto-deploy.sh" + +# Accessible variables +# $ezBenchDir [RO]: Directory of the ezbench +# ------------------ +# $rounds [WO]: Default number of rounds +# $makeAndDeployCmd [WO]: Command to compile and deploy the current git HEAD +# $gitVersionDeployedCmd [WO]: Command to print out the sha1 of the version currently deployed +# $repoDir [WO]: Path to the git repo to use for this profile +# $reportName [WO]: Name to give to your report +# $testsDir [WO]: List of pathes to the directories containing the tests for this profile +# $testsList [WO]: List of tests that should be ran in this profile +# $testExcludeList [WO]: List of tests that should be excluded in this profile + +# MANDATORY: Print the currently-deployed version of the repo +# Inputs: +# - $repoDir +function profile_repo_deployed_version() { + "$PROFILE_DEPLOY_DIR/libexec/intel-gpu-tools/template" 2> /dev/null | head -n 1 | cut -d 'g' -f 2 | cut -d ' ' -f 1 +} + +# MANDATORY: Compile the version of the repo found in the current working +# directory and install it to $(profile_repo_deployment_version_dir). +# Inputs: +# - CWD: Set inside the repo at the right version +# - $repoDir +# Outputs: +# - Print the build command line (echo "BUILD_INFO: build command: $cmd") +# - configure, compile and install to the prefix $(profile_repo_deployment_version_dir) +# - Fill the SHA1-db with all the information about the build when applicable +function repo_compile_version() { + prefix_dir=$(profile_repo_deployment_version_dir) + + ARGS=${REPO_IGT_PARAMETERS//\$REPO_IGT_PREFIX/$prefix_dir} + echo "BUILD_INFO: build command: ./autogen.sh $ARGS" + ./autogen.sh $ARGS || return 71 + + make -j8 || return 71 + mkdir -p "$prefix_dir" || return 72 + make_install_sha1_dump || return 72 + + return 0 +} + + +export LD_LIBRARY_PATH="$PROFILE_DEPLOY_DIR/lib":$LD_LIBRARY_PATH +export IGT_TEST_ROOT="$PROFILE_DEPLOY_DIR/libexec/intel-gpu-tools" + +rounds=3 +repoDir="$REPO_IGT" diff --git a/tests.d/piglit/igt.test b/tests.d/piglit/igt.test index 1348ca9..727fc8b 100644 --- a/tests.d/piglit/igt.test +++ b/tests.d/piglit/igt.test @@ -27,7 +27,8 @@ function __igt_resume__ { # generate the report if [ -f "$piglit_output/metadata.json" ]; then # ignore the incomplete result to avoid being stuck in a loop - local cmdline="sudo IGT_TEST_ROOT="$IGT_ROOT/tests" $OWATCH $REPO_PIGLIT/piglit resume $PIGLITCONF -n ${run_log_file}_tmp" + IGT_TEST_ROOT=${IGT_TEST_ROOT:-"$IGT_ROOT/tests"} + local cmdline="sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" $OWATCH $REPO_PIGLIT/piglit resume $PIGLITCONF -n ${run_log_file}_tmp" ENV_DUMP_RESTRICT_TO_BINARY="NO_ENVDUMP_PLEASE" \ $cmdline >> "$run_log_file.stdout" 2>> "$run_log_file.stderr" @@ -70,7 +71,8 @@ function __igt_run__ { if [ -n "$PIGLITCONF" ]; then ABORTFLAG="--abort-on-monitored-error" fi - local cmdline="sudo IGT_TEST_ROOT="$IGT_ROOT/tests" $OWATCH $REPO_PIGLIT/piglit run $PIGLITCONF $ABORTFLAG $PIGLIT_RUN_PARAMS -s --ignore-missing $parameters $testlist tests/igt.py ${piglit_output}" + IGT_TEST_ROOT=${IGT_TEST_ROOT:-"$IGT_ROOT/tests"} + local cmdline="sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" $OWATCH $REPO_PIGLIT/piglit run $PIGLITCONF $ABORTFLAG $PIGLIT_RUN_PARAMS -s --ignore-missing $parameters $testlist tests/igt.py ${piglit_output}" ENV_DUMP_REQUIRE_ARGUMENT="$REPO_PIGLIT/piglit" \ ENV_DUMP_NO_METRICS=1 \ diff --git a/user_parameters.sh.sample b/user_parameters.sh.sample index a0f4256..661da9d 100644 --- a/user_parameters.sh.sample +++ b/user_parameters.sh.sample @@ -12,6 +12,7 @@ XRANDR_RESET_ARGS="--auto" # Repo addresses REPO_MESA=/opt/source/mesa REPO_LINUX=/opt/source/linux +REPO_IGT=/opt/source/intel-gpu-tools REPO_PERF_BISECT='/opt/source/bisect-test' # git://people.freedesktop.org/~mperes/bisect-test REPO_PIGLIT='/opt/source/piglit' REPO_XF86_VIDEO_INTEL=/home/mupuf/src/xf86-video-intel |