Skip to content

Instantly share code, notes, and snippets.

@refack
Created June 15, 2018 20:12
Show Gist options
  • Save refack/05e9afb15c722ce2fece27bab620a1f2 to your computer and use it in GitHub Desktop.
Save refack/05e9afb15c722ce2fece27bab620a1f2 to your computer and use it in GitHub Desktop.
<?xml version='1.1' encoding='UTF-8'?>
<matrix-project plugin="[email protected]">
<actions/>
<description>Runs the v8 tests from within the Node tree. Should be run when adding/modifying floating patches on V8</description>
<keepDependencies>false</keepDependencies>
<properties>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
<projectUrl>https://github.com/nodejs/node/</projectUrl>
<displayName></displayName>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
<com.sonyericsson.rebuild.RebuildSettings plugin="[email protected]">
<autoRebuild>false</autoRebuild>
<rebuildDisabled>false</rebuildDisabled>
</com.sonyericsson.rebuild.RebuildSettings>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>GITHUB_ORG</name>
<description>The user/org of the GitHub repo</description>
<defaultValue>nodejs</defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>REPO_NAME</name>
<description>The name of the repo</description>
<defaultValue>node</defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>GIT_REMOTE_REF</name>
<description>The remote portion of the Git refspec to fetch and test</description>
<defaultValue>refs/heads/master</defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>REBASE_ONTO</name>
<description>Optionally, rebase onto the given ref before testing. Leave blank to skip rebasing.</description>
<defaultValue></defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>POST_REBASE_SHA1_CHECK</name>
<description>After rebasing, check that the resulting commit sha1 matches the given one. If left blank, no check is performed.</description>
<defaultValue></defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.BooleanParameterDefinition>
<name>IGNORE_FLAKY_TESTS</name>
<description>Mark the build as unstable instead of failure if only flaky tests fail</description>
<defaultValue>true</defaultValue>
</hudson.model.BooleanParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="[email protected]">
<maxConcurrentPerNode>0</maxConcurrentPerNode>
<maxConcurrentTotal>0</maxConcurrentTotal>
<categories class="java.util.concurrent.CopyOnWriteArrayList"/>
<throttleEnabled>false</throttleEnabled>
<throttleOption>project</throttleOption>
<limitOneJobWithMatchingParams>false</limitOneJobWithMatchingParams>
<matrixOptions>
<throttleMatrixBuilds>true</throttleMatrixBuilds>
<throttleMatrixConfigurations>false</throttleMatrixConfigurations>
</matrixOptions>
<paramsToUseForLimit></paramsToUseForLimit>
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<name>origin</name>
<refspec>+refs/heads/*:refs/remotes/origin/* +$GIT_REMOTE_REF:refs/remotes/origin/_jenkins_local_branch</refspec>
<url>[email protected]:$GITHUB_ORG/$REPO_NAME.git</url>
<credentialsId>96d5f81c-e9ad-45f7-ba5d-bc8107c0ae2c</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>refs/heads/_jenkins_local_branch</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<browser class="hudson.plugins.git.browser.GithubWeb">
<url>https://github.com/nodejs/node</url>
</browser>
<submoduleCfg class="list"/>
<extensions>
<hudson.plugins.git.extensions.impl.CleanCheckout/>
<hudson.plugins.git.extensions.impl.CloneOption>
<shallow>false</shallow>
<noTags>true</noTags>
<reference>/home/iojs/git/io.js.reference</reference>
<timeout>20</timeout>
<depth>0</depth>
<honorRefspec>false</honorRefspec>
</hudson.plugins.git.extensions.impl.CloneOption>
<hudson.plugins.git.extensions.impl.ChangelogToBranch>
<options>
<compareRemote>origin</compareRemote>
<compareTarget>_jenkins_local_branch~1</compareTarget>
</options>
</hudson.plugins.git.extensions.impl.ChangelogToBranch>
</extensions>
</scm>
<assignedNode>jenkins-workspace</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<hudson.triggers.TimerTrigger>
<spec>H H(2-6) * * *</spec>
</hudson.triggers.TimerTrigger>
</triggers>
<concurrentBuild>true</concurrentBuild>
<axes>
<hudson.matrix.LabelAxis>
<name>nodes</name>
<values>
<string>benchmark</string>
<string>ppcle-ubuntu1404</string>
<string>rhel72-s390x</string>
</values>
</hudson.matrix.LabelAxis>
<hudson.matrix.LabelAxis>
<name>v8test</name>
<values>
<string>v8test</string>
</values>
</hudson.matrix.LabelAxis>
</axes>
<builders>
<hudson.tasks.Shell>
<command>git --version
# Name and email in git config need to be the same across all jobs
# so that git rebase --committer-date-is-author-date will produce
# the same commit SHA1
git config --replace-all user.name Dummy
git config --replace-all user.email [email protected]
git config user.name
git config user.email
echo $GIT_COMMITTER_NAME
echo $GIT_AUTHOR_NAME
git rebase --abort || true
git checkout -f refs/remotes/origin/_jenkins_local_branch
git config user.name
git config user.email
echo $GIT_COMMITTER_NAME
echo $GIT_AUTHOR_NAME
git status
git rev-parse HEAD
git rev-parse $REBASE_ONTO
if [ -n &quot;${REBASE_ONTO}&quot; ]; then
git rebase --committer-date-is-author-date $REBASE_ONTO
fi
if [ -n &quot;${POST_REBASE_SHA1_CHECK}&quot; ]; then
check_sha1=${POST_REBASE_SHA1_CHECK}
head_sha1=$(git rev-parse HEAD)
if [ &quot;$head_sha1&quot; != &quot;$check_sha1&quot; ]; then
exit 1
fi
fi
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command> curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-diagnostics.sh | bash -ex -s before </command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command># required because otherwise we get clang errors ?
rm -rf deps/v8/tools/clang || true</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command># setup depot tools
rm -rf depot_tools || true
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>#/bin/bash
export PATH=$WORKSPACE/depot_tools:$PATH
# needed to work with latest depot tools
export VPYTHON_BYPASS=&quot;manually managed python not supported by chrome operations&quot;
RUN_TESTS=&quot;RUN&quot;
SKIP_MESSAGE=&quot;ok # skipped s390 not supported for versions less than 6, skipping&quot;
if [ &quot;X$DESTCPU&quot; = &quot;X&quot; ]; then
cd tools
echo &quot;from utils import *&quot; &gt;getArch.py
echo &quot;print GuessArchitecture()&quot; &gt;&gt; getArch.py
# assume 64 bit unless set specifically
DESTCPU=`python getArch.py | sed &apos;s/ia32/x64/&apos; | sed &apos;s/ppc/ppc64/&apos; | sed &apos;s/arm/arm64/&apos; | sed &apos;s/s390/s390x/&apos;`
cd ..
fi
echo [DESTCPU=$DESTCPU]
if [ &quot;X$DESTCPU&quot; = &quot;XNone&quot; ]; then
# we only support running v8 tests on recognized platforms. For example
# if you run this for 4.X on s390 the platform will not be recognized
# as 4.X does not support s390.
RUN_TESTS=&quot;DONT_RUN&quot;
fi
if [ &quot;X$DESTCPU&quot; = &quot;Xppc64&quot; ]; then
# select the appropriate compiler
rm -rf build
git clone https://github.com/nodejs/build.git
. ./build/jenkins/scripts/select-compiler.sh
# temporarily patch make-v8.sh until we upstream the required
# changes
git apply $HOME/build-tools/make-v8.patch
echo &quot;import platform&quot; &gt; getMachine.py
echo &quot;print platform.machine()&quot; &gt;&gt; getMachine.py
ENDIAN=`python getMachine.py | sed &apos;s/ppc64//g&apos;`
if [ &quot;X$ENDIAN&quot; != &quot;Xle&quot; ]; then
# ICU tests are diabled for BE platforms because the ICU included by V8 is le only
# This is not an issue when we build in Node as we include the proper data files for BE but
# it does mean that we need to build/test without ICU when running the v8 tests.
DISABLE_V8_I18N_OPTION=&quot;DISABLE_V8_I18N=1&quot;
fi
fi
if [ &quot;X$DESTCPU&quot; = &quot;Xarm64&quot; ]; then
# arm seems to be using clang even though the version downloaded from google is for linux
# which obviously does not work force it to use g++/gcc instead
ADDITIONAL_CLANG_OPTIONS=&apos;GYPFLAGS=&quot;-Dhost_clang=0&quot;&apos;
fi
if [ &quot;X$DESTCPU&quot; = &quot;Xs390x&quot; ]; then
# ICU tests are diabled for BE platforms because the ICU included by V8 is le only
# This is not an issue when we build in Node as we include the proper data files for BE but
# it does mean that we need to build/test without ICU when running the v8 tests.
DISABLE_V8_I18N_OPTION=&quot;DISABLE_V8_I18N=1&quot;
# select the appropriate compiler
rm -rf build
git clone https://github.com/nodejs/build.git
. ./build/jenkins/scripts/select-compiler.sh
# temporarily patch make-v8.sh until we upstream the required
# changes
git apply $HOME/build-tools/make-v8.patch
# 390 is only supported on v6 and later for now
MAJOR_VERSION=`cat src/node_version.h |grep &quot;#define NODE_MAJOR_VERSION&quot; | awk &apos;{ print $3}&apos;`
if [ &quot;$MAJOR_VERSION&quot; -lt &quot;6&quot; ]; then
RUN_TESTS=&quot;DONT_RUN&quot;
fi
fi
if [ &quot;$RUN_TESTS&quot; = &quot;RUN&quot; ]; then
#make -j $(getconf _NPROCESSORS_ONLN) v8 $DISABLE_V8_I18N_OPTION DESTCPU=$DESTCPU ARCH=$DESTCPU.release $ADDITIONAL_CLANG_OPTIONS
# when run under jenkins the d8-os.js test hangs because signals don&apos;t set to the process when a os.process times out
# it works just fine when run from the command line so its not an issue with v8 itself. I&apos;d like to figure out why
# it fails under jenkins but so far have not managed to so remove this test before running
rm deps/v8/test/mjsunit/d8-os.js || true
./configure
make -j $(getconf _NPROCESSORS_ONLN) test-v8 V=1 $DISABLE_V8_I18N_OPTION DESTCPU=$DESTCPU ARCH=$DESTCPU.release $ADDITIONAL_CLANG_OPTIONS ENABLE_V8_TAP=True V8_EXTRA_TEST_OPTIONS=&quot;--progress=dots --timeout=120&quot;
else
echo $SKIP_MESSAGE
# fake out so we don&apos;t get failures
echo &apos;&lt;testsuite tests=&quot;1&quot;&gt;&lt;testcase name=&quot;none/none.none test were skipped&quot; time=&quot;0.001&quot;/&gt;&lt;/testsuite&gt;&apos; &gt;v8-tap.xml
fi
# clean up so that the v8 directory is always fresh
rm -rf deps/v8 || true
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-diagnostics.sh | bash -ex</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.tasks.junit.JUnitResultArchiver plugin="[email protected]">
<testResults>v8-tap.xml</testResults>
<keepLongStdio>false</keepLongStdio>
<healthScaleFactor>1.0</healthScaleFactor>
<allowEmptyResults>false</allowEmptyResults>
</hudson.tasks.junit.JUnitResultArchiver>
<hudson.tasks.Mailer plugin="[email protected]">
<recipients>[email protected] [email protected] [email protected] [email protected]</recipients>
<dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
<sendToIndividuals>false</sendToIndividuals>
</hudson.tasks.Mailer>
<hudson.plugins.parameterizedtrigger.BuildTrigger plugin="[email protected]">
<configs>
<hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
<configs>
<hudson.plugins.parameterizedtrigger.CurrentBuildParameters/>
</configs>
<projects>node-test-commit-linux-v8-updates</projects>
<condition>ALWAYS</condition>
<triggerWithNoParameters>false</triggerWithNoParameters>
<triggerFromChildProjects>false</triggerFromChildProjects>
</hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
</configs>
</hudson.plugins.parameterizedtrigger.BuildTrigger>
</publishers>
<buildWrappers>
<hudson.plugins.build__timeout.BuildTimeoutWrapper plugin="[email protected]">
<strategy class="hudson.plugins.build_timeout.impl.NoActivityTimeOutStrategy">
<timeoutSecondsString>1800</timeoutSecondsString>
</strategy>
<operationList>
<hudson.plugins.build__timeout.operations.FailOperation/>
</operationList>
</hudson.plugins.build__timeout.BuildTimeoutWrapper>
<hudson.plugins.timestamper.TimestamperBuildWrapper plugin="[email protected]"/>
<hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="[email protected]">
<colorMapName>xterm</colorMapName>
</hudson.plugins.ansicolor.AnsiColorBuildWrapper>
</buildWrappers>
<executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl">
<runSequentially>false</runSequentially>
</executionStrategy>
</matrix-project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment