Hi,
For the sake of keeping things organized and easier to review, i've broken
up the previous change into smaller pieces.
Luis Machado (6):
Make the default target only build the utils
Remove utils/utils_sanity.sh
Invoke scripts with sudo
Adjust compiler flag variables
Add install target
Add missing phony targets
Makefile | 25 +++++++++++++++++++++++++
README | 8 ++++++++
Test.mk | 32 ++++++++++++++++++++++++--------
utils/utils_sanity.sh | 39 ---------------------------------------
4 files changed, 57 insertions(+), 47 deletions(-)
delete mode 100755 utils/utils_sanity.sh
--
2.17.1
We'd like to be able to better integrate pm-qa into an ebuild system that is
used on ChromiumOS' build system. For that we need a few changes, the main one
being an install target and better flow so we don't have to add
package-specific implementations of src_compile and src_install.
The following patch adds an install target to the main makefile, adds a default
prefix of /opt/pm-qa and only uses sudo to invoke the tests, without expecting
sudo to run make itself.
The README file has also been updated to reflect the new changes.
utils/utils_sanity.sh has been removed since it had no real purpose.
My make-fu isn't great, so any feedback would be appreciated.
It would also be nice if someone could review this and make sure it is sane
for Android builds. It shouldn't change the Android.mk flow though.
Given that, does the patch look OK for pushing?
Thanks,
Luis
Signed-off-by: Luis Machado <luis.machado(a)linaro.org>
---
Makefile | 25 +++++++++++++++++++++++++
README | 10 +++++++++-
Test.mk | 31 ++++++++++++++++++++++---------
utils/utils_sanity.sh | 39 ---------------------------------------
4 files changed, 56 insertions(+), 49 deletions(-)
delete mode 100755 utils/utils_sanity.sh
diff --git a/Makefile b/Makefile
index d76deb7..8e0cf17 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,19 @@
# - initial API and implementation
#
hotplug_allow_cpu0?=0
+prefix := /opt/pm-qa
+SRC := $(wildcard utils/*.c) $(wildcard cpuidle/*.c)
+EXEC=$(SRC:%.c=%)
+
+# All directories that need to be created during installation.
+SUBDIRS := $(wildcard */.)
+
+# All files that need to be installed.
+INSTALL_FILES := $(wildcard */*.sh */*.txt) $(EXEC)
+
+.PHONY: all clean check recheck uncheck
+
+# Build all the utils required by the tests.
all:
@(cd utils; $(MAKE))
@@ -47,3 +60,15 @@ recheck: uncheck check
clean:
@(cd utils; $(MAKE) clean)
+# Copy all the required directories and files to the installation
+# directory.
+install: all
+ @echo "Installing files to $(DESTDIR)/$(prefix)"
+
+ @(for dir in $(SUBDIRS); do \
+ mkdir -p $(DESTDIR)/$(prefix)/$$dir; \
+ done;)
+
+ @(for file in $(INSTALL_FILES); do \
+ cp -a $$file $(DESTDIR)/$(prefix)/$$file; \
+ done;)
diff --git a/README b/README
index b976727..c0c0ca4 100644
--- a/README
+++ b/README
@@ -1,6 +1,10 @@
Commands
========
-- In order to run the tests, invoke as root:
+- If you just want to build the supporting utils for the pm-qa tests, invoke:
+
+ make
+
+- In order to run the tests, invoke:
make check
@@ -12,6 +16,10 @@ Commands
make -C cpufreq check
+- If you want to install the pm-qa suite somewhere (default prefix is
+ /opt/pm-qa), invoke:
+
+ make install DESTDIR=<destination_directory>
Test Specifications
===================
diff --git a/Test.mk b/Test.mk
index 44f0ece..441af77 100644
--- a/Test.mk
+++ b/Test.mk
@@ -24,19 +24,26 @@
SNT=$(wildcard *sanity.sh)
TST=$(sort $(wildcard *[!{sanity}].sh))
LOG=$(TST:.sh=.log)
-CFLAGS?=-g -Wall -pthread
+
+# Default flags passed to the compiler.
+CFLAGS?=-g -Wall
+
+# Required compiler flags to build the utils.
+FLAGS?=-pthread
+
+# Default compiler to build the utils.
CC?=gcc
-SRC=$(wildcard *.c)
-EXEC=$(SRC:%.c=%)
-check: build_utils run_tests
+# All utils' source files.
+SRC=$(wildcard ../utils/*.c) $(wildcard ../cpuidle/*.c)
-build_utils:
- $(CC) ../utils/uevent_reader.c -o ../utils/uevent_reader
- $(CC) ../utils/cpucycle.c -o ../utils/cpucycle
+# All executable files built from the utils' source files.
+EXEC=$(SRC:%.c=%)
+# Build the utils and run the tests.
+build_utils: $(EXEC)
SANITY_STATUS:= $(shell if test $(SNT) && test -f $(SNT); then \
- ./$(SNT); if test "$$?" -eq 0; then echo 0; else \
+ sudo ./$(SNT); if test "$$?" -eq 0; then echo 0; else \
echo 1; fi; else echo 1; fi)
ifeq "$(SANITY_STATUS)" "1"
@@ -48,16 +55,22 @@ run_tests: uncheck $(EXEC) $(LOG)
@echo -n "### "; cat $(<:.sh=.txt);
@echo -n "### "; grep "URL :" ./$< | awk '/http/{print $$NF}'
@echo "###"
- -@./$< 2> $@
+ -@sudo ./$< 2> $@
else
run_tests:
./$(SNT)
# @cat $(<:.sh=.txt)
endif
+# Target for building all the utils we need, from sources.
+$(EXEC): $(SRC)
+ $(CC) $(CFLAGS) $(FLAGS) $@.c -o $@
+
clean:
rm -f *.o $(EXEC)
+check: build_utils run_tests
+
uncheck:
-@$(shell test ! -z "$(LOG)" && rm -f $(LOG))
diff --git a/utils/utils_sanity.sh b/utils/utils_sanity.sh
deleted file mode 100755
index c5bdcd7..0000000
--- a/utils/utils_sanity.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-#
-# PM-QA validation test suite for the power management on Linux
-#
-# Copyright (C) 2014, Linaro Limited.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# Contributors:
-# Sanjay Singh Rawat <sanjay.rawat(a)linaro.org>
-# - initial API and implementation
-#
-
-. ../include/functions.sh
-
-is_root
-if [ $? -ne 0 ]; then
- log_skip "user is not root"
- exit 0
-fi
-
-check_utils() {
- # just returning SUCCESS, so suite doesn't break
- return 1
-}
-
-check_utils
--
2.17.1
Hello All,
Sorry for the short notice, but we need to reboot our servers tomorrow
due to a Hetzner network change. We also have a LTS and plugin update
to do so will bundle all these changes into this weekend.
The server will stop processing jobs on the 15/12/2018 at around
23:00 UTC, as the server will be put into "Shutdown mode".
We will be updating plugins, Jenkins and fixes some bugs.
Start: 16/12/2018 09:00 UTC
End: 16/12/2018 12:00 UTC
Regards
Benjamin
A long time ago in Linaro we looked at the issue of openGL vs OpenGLES
on arm, including the possibility of a shim library to make it easier
for applications to switch between them.
Who knows about this and what happened/was decided?
The Debian QT maintainers are currently considering switching from
building QT for arm64 for openGLES instead of openGL because there is
a lot more hardware available (cheapish dev boards) with drivers
supporting GLES then desktop style hardware with standard graphics
card supporting 'proper GL'. Ubuntu did this 2 years ago.
Unfortunately building for 'either' seems to be very difficult due to
ABI incompatibilities.
In general we don't want gratuitous difference between arm64 and x86,
so this seems problematic, but I am no expert in this area and would
like to talk to someone who does know about this stuff, and perhaps
this needs to go back on the Linaro roadmap for fixing?
Wookey
--
Principal hats: Linaro, Debian, Wookware, ARM
http://wookware.org/
Hello All,
The server will stop processing jobs on the 2018-11-09 at around
19:00 UTC, as the server will be put into "Shutdown mode".
We will be updating plugins, Jenkins and the docker builders.
Start: 2018-11-10 09:00 UTC
End: 2018-11-10 12:00 UTC
Regards
Hello all,
Unfortunately, Jenkins has hit a bug this morning where its not
provisioning our docker slaves which is causing a build queue.
This is going to now mean we got to restart Jenkins, sorry for the
inconvenience.
Ben
Dear Sir,
I am Malaya from India, currently i am doing PhD. In my PhD work i have
design a medical instrument which is run on Android lollypop(5.1.) and
nougat (7.1). But i want to test this device for that i am trying to set-up
the LAVA environment. I have followed the below link.
https://wiki.linaro.org/QA/AutomatedTestingFramework
Please suggest me how to setup LAVA for my custom build android.
Thanks and Regards
Malaya Ku. Rout
Hello All,
Due to a security vulnerability, we need to upgrade gerrit from the current
2.15.3 release to 2.15.5. The upgrade will take place tonight around 8pm
UTC. No extended downtime is expected but there will be a brief
interruption in service due the server being restarted.
Let me know if you have any questions or concerns.
Thanks,
--
Kelley Spoon <kelley.spoon(a)linaro.org>
Hello All,
The server will stop processing jobs on the 19/10/2018 at around
23:00 UTC, as the server will be put into "Shutdown mode".
We will be updating plugins, Jenkins and fixes some bugs.
Start: 20/10/2018 09:00 UTC
End: 20/10/2018 12:00 UTC
Regards
Ben
Anyone got a spare hikey960 they can bring to Vancouver?
I'm lending mine to a kernel dev, but could do with having one to hand there.
TIA
Wookey
--
Principal hats: Linaro, Debian, Wookware, ARM
http://wookware.org/