From 115e095157e2dbe9e52bdba77dbffd7b9c262fa6 Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Mar 22 2020 00:53:08 +0000 Subject: Add testing and enable gating And enable building against itself. --- diff --git a/dotnet3.1.spec b/dotnet3.1.spec index 76a64b6..c08312f 100644 --- a/dotnet3.1.spec +++ b/dotnet3.1.spec @@ -67,8 +67,6 @@ Source0: dotnet-v%{sdk_version}-SDK.tar.gz Source1: check-debug-symbols.py Source2: dotnet.sh.in -Patch1: sdk-rid.patch - # Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS Patch100: corefx-optflags-support.patch @@ -102,6 +100,7 @@ BuildRequires: dotnet-build-reference-packages BuildRequires: dotnet-sdk-3.1 BuildRequires: dotnet-sdk-3.1-source-built-artifacts %endif +BuildRequires: findutils BuildRequires: git %if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: glibc-langpack-en @@ -384,8 +383,8 @@ find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \; cat /etc/os-release %if %{without bootstrap} -cp -a %{_libdir}/dotnet .dotnet -patch -p0 -i %{PATCH1} +# We need to create a copy because we will mutate this +cp -a %{_libdir}/dotnet previously-built-dotnet %endif export CFLAGS="%{dotnet_cflags}" @@ -399,12 +398,15 @@ export LDFLAGS="%{dotnet_ldflags}" #%%endif VERBOSE=1 ./build.sh \ - -- \ - /v:n \ - /p:SkipPortableRuntimeBuild=true \ - /p:LogVerbosity=n \ - /p:MinimalConsoleLogOutput=false \ - /p:ContinueOnPrebuiltBaselineError=true \ +%if %{without bootstrap} + --with-sdk previously-built-dotnet \ +%endif + -- \ + /v:n \ + /p:SkipPortableRuntimeBuild=true \ + /p:LogVerbosity=n \ + /p:MinimalConsoleLogOutput=false \ + /p:ContinueOnPrebuiltBaselineError=true \ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..0d881de --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/sdk-rid.patch b/sdk-rid.patch deleted file mode 100644 index 99dda5b..0000000 --- a/sdk-rid.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json -+++ .dotnet/sdk/3.1.101/RuntimeIdentifierGraph.json -@@ -488,6 +488,23 @@ - "fedora-x64" - ] - }, -+ "fedora.33": { -+ "#import": [ -+ "fedora" -+ ] -+ }, -+ "fedora.33-arm64": { -+ "#import": [ -+ "fedora.33", -+ "fedora-arm64" -+ ] -+ }, -+ "fedora.33-x64": { -+ "#import": [ -+ "fedora.33", -+ "fedora-x64" -+ ] -+ }, - "freebsd": { - "#import": [ - "unix" -@@ -2042,4 +2059,4 @@ - ] - } - } --} -\ No newline at end of file -+} diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +2 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..87b3807 --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,6 @@ +--- + +standard-inventory-qcow2: + qemu: + m: 5G + diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ede9095 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,38 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + - container + - atomic + repositories: + - repo: "https://github.com/redhat-developer/dotnet-bunny.git" + dest: "dotnet-bunny" + - repo: "https://github.com/redhat-developer/dotnet-regular-tests.git" + dest: "dotnet-regular-tests" + tests: + - build_test_suite: + dir: dotnet-bunny + run: make + - print_test_suite_version: + dir: dotnet-bunny + run: bin/turkey --version + - run_regular_tests: + dir: dotnet-regular-tests + run: ../dotnet-bunny/bin/turkey -l={{ remote_artifacts }} + required_packages: + - babeltrace + - bash-completion + - binutils + - expect + - git + - jq + - lldb + - lttng-tools + - make + - npm + - python3 + - strace + - wget + - which