Merge ~bladernr/plainbox-provider-certification-server:1879965-move-GPGPU-to-own-provider into plainbox-provider-certification-server:master

Proposed by Jeff Lane 
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4291d34ac7f69b291248007dfc76f0bbf8e67b04
Merged at revision: 4bc5a775ea68cddc5803e3e2bf1f8e417e9d0a08
Proposed branch: ~bladernr/plainbox-provider-certification-server:1879965-move-GPGPU-to-own-provider
Merge into: plainbox-provider-certification-server:master
Diff against target: 148 lines (+3/-18)
2 files modified
dev/null (+0/-15)
tools/canonical-certification-precheck (+3/-3)
Reviewer Review Type Date Requested Status
Sylvain Pineau Approve
Review via email: mp+384368@code.launchpad.net

Commit message

LP: 1879965 - Moved GPGPU test files into their own provider.

Description of the change

LP: 1879965 - Moved GPGPU test files into their own provider.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/launcher/test-gpgpu b/launcher/test-gpgpu
2deleted file mode 100755
3index 4669bf0..0000000
4--- a/launcher/test-gpgpu
5+++ /dev/null
6@@ -1,19 +0,0 @@
7-#!/usr/bin/env checkbox-cli
8-
9-[launcher]
10-app_id = com.canonical.certification:certification-server
11-launcher_version = 1
12-stock_reports = submission_files, certification
13-
14-[test plan]
15-unit = com.canonical.certification::gpgpu-only
16-forced = yes
17-
18-[test selection]
19-forced = yes
20-
21-[ui]
22-output = hide-resource-and-attachment
23-
24-[config]
25-config_filename = canonical-certification.conf
26diff --git a/tools/canonical-certification-precheck b/tools/canonical-certification-precheck
27index 210a5b3..c8ba2c4 100755
28--- a/tools/canonical-certification-precheck
29+++ b/tools/canonical-certification-precheck
30@@ -839,9 +839,9 @@ if lspci | grep "3D controller [0302]"; then
31 gpu="GPGPU Detected"
32 echo " $gpu"
33 echo " In order to test the discovered GPGPU device(s)"
34- echo " You will need to run the gpu-setup.sh script "
35- echo " included with the Server Certification suite to"
36- echo " install the necessary drivers and toolkit."
37+ echo " You will need to install the checkbox-provider-gpgpu"
38+ echo " package and run the gpu-setup script to install"
39+ echo " the necessary drivers and toolkit."
40 eval info${i}=\"$gpu\"
41 info
42 else
43diff --git a/tools/gpu-setup.sh b/tools/gpu-setup.sh
44deleted file mode 100755
45index 22a8430..0000000
46--- a/tools/gpu-setup.sh
47+++ /dev/null
48@@ -1,79 +0,0 @@
49-#!/bin/bash
50-
51-if [[ $EUID -ne 0 ]]; then
52- echo "ERROR: This script must be run as root"
53- exit 1
54-fi
55-
56-echo "Configuring system for GPU Testing"
57-echo "**********************************"
58-echo "*"
59-
60-# For now we need internet access for this to work. Future versions will
61-# remove this necessity
62-echo "* Testing network connectivity"
63-[[ ! `ping -c 1 www.ubuntu.com` ]] \
64- && echo "ERROR: This script requires internet access to function correctly" \
65- && exit 1
66-echo "*"
67-echo "**********************************"
68-echo "*"
69-echo "* Adding nVidia package repository"
70-## Leave the following bits for now, it's useful code to template if we sort
71-## out local hosting in the future.
72-#file_pattern="cuda-repo-ubuntu$(lsb_release -r | cut -f 2 | sed -es/\\.//)*.deb"
73-#gw_ip=`ip route | awk '/default/ { print $3 }'`
74-
75-# attempt a download from our MAAS server (presume the SUT's gw IP is MAAS)
76-#wget -r -l1 -nd --no-parent -A "$file_pattern" http://$gw_ip/nvidia/
77-#nvidia_pkg=`find / -name $file_pattern`
78-
79-#if [ -z "$nvidia_pkg" ]; then
80-# echo "* No local package found, installing remote installer"
81-# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
82-# dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
83-# apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
84-#else
85-# echo "* Local package detected at $nvidia_pkg... installing"
86-# key_cmd=`dpkg -i $nvidia_pkg |awk '/To install the key, run this command/{getline; print}'`
87-# $key_cmd
88-#fi
89-
90-## For now, require internet access and installing directly from nVidia
91-# SAUCE: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=debnetwork
92-
93-OSRELEASE=ubuntu`lsb_release -r | cut -f2 |sed -e 's/\.//'`
94-
95-wget https://developer.download.nvidia.com/compute/cuda/repos/$OSRELEASE/x86_64/cuda-$OSRELEASE.pin
96-mv cuda-$OSRELEASE.pin /etc/apt/preferences.d/cuda-repository-pin-600
97-# Ran into a case where the 16.04 repo uses http while 18.04 uses https :/
98-KEYSERVER_URL_TAIL="://developer.download.nvidia.com/compute/cuda/repos/$OSRELEASE/x86_64/7fa2af80.pub"
99-SUCCESS=1
100-for KEYSERVER_URL_HEAD in https http; do
101- KEYSERVER_URL=$KEYSERVER_URL_HEAD$KEYSERVER_URL_TAIL
102- apt-key adv --fetch-keys $KEYSERVER_URL
103- SUCCESS=$?
104- [ $SUCCESS == 0 ] && break
105-done
106-
107-add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/$OSRELEASE/x86_64/ /"
108-
109-# Install necessary files
110-apt update
111-echo "* Installing necessary pacakges"
112-apt install -y build-essential git cuda
113-
114-#fix the path to get nvcc from the cuda package
115-CUDA_PATH=$(find /usr/local -maxdepth 1 -type d -iname "cuda*")/bin
116-export PATH=$PATH:$CUDA_PATH
117-
118-# get the gpu-burn repo and build it
119-echo "* Cloning gpu-burn repo"
120-GPU_BURN_DIR=/opt/gpu-burn
121-git clone https://github.com/wilicc/gpu-burn.git $GPU_BURN_DIR
122-cd $GPU_BURN_DIR
123-echo "* Building gpu-burn"
124-make && echo "* Build completed..."
125-echo "*"
126-echo "* Completed installation. Please reboot the machine now"
127-echo "* to load the nVidia proprietary drivers"
128diff --git a/units/gpgpu-only.pxu b/units/gpgpu-only.pxu
129deleted file mode 100644
130index b92f279..0000000
131--- a/units/gpgpu-only.pxu
132+++ /dev/null
133@@ -1,15 +0,0 @@
134-id: gpgpu-only
135-unit: test plan
136-_name: GPGPU Compute Testing
137-_description:
138- Tests for GPGPU Computations (non-graphical)
139-nested_part:
140- com.canonical.certification::server-info-attachment-automated
141- com.canonical.certification::server-firmware
142- com.canonical.certification::server-miscellaneous
143- com.canonical.certification::gpgpu-tests
144-include:
145-bootstrap_include:
146- device
147- fwts
148-

Subscribers

People subscribed via source and target branches