Re: How to move src/Makefile into a Shared client/cros Directory?

8 views
Skip to first unread message

Scott Cunningham

unread,
Oct 20, 2016, 6:17:09 PM10/20/16
to Chromium OS dev
Dear Chromium OS Dev experts,

I'm having trouble moving the policy_server Makefiles out of the test-specific src directories into a common, shared directory, for AutoTest. Can someone give me hints about how to do this?

Background: 
There are ~21 Chrome OS policy tests that use the AutoTest fake DM server (aka policy_server) to setup and download enterprise policies to a Chrome OS device. The enterprise_policy_base.py class compiles this policy_server in the setup() method using the utils.make() command, as specified in best-practices.md, like this:

    def setup(self):
        os.chdir(self.srcdir)
        utils.make('OUT_DIR=.')

The above approach requires that every test must have it's own local src directory containing an identical copy of the Makefile. That's a lot of unnecessary duplication!  And when build_packages is run, the total compiled copies fill up a lot of space.  What I hope to do is delete all the test-specific src directories, and replace them with a single src directory located in .../autotest/file/client/cros/enterprise/src.  The solution seems simple enough: Just copy one of the src directories to .../cros/enterprise/src, delete all the others. Then change the above setup() to:

    def setup(self):
        # Determine cros/enterprise/src directory path.
        client_dir = os.path.dirname(os.path.dirname(self.bindir))
        enterprise_src_dir = os.path.join(client_dir, 'cros/enterprise/src')

        os.chdir(enterprise_src_dir)
        utils.make('OUT_DIR=%s' % enterprise_src_dir)

The Error:
Alas, build_packages (and emerge) don't like something about this. Build_packages complains about ACCESS VIOLATION when it compiles the very first policy_* test, trying to create /build/wolf/usr/local/build/autotest/client/cros/enterprise/src/chrome_device_policy_pb2.py.

Here's an except from the build_packages command, jumping (...) to where the error happens:
(cr) ((a171839...)) scunningham@xot ~/trunk/src/scripts $ ./build_packages --board=wolf
...
autotest-chrome-9999: * INFO:root:setup policy_AutoFillEnabled.
autotest-chrome-9999: DEBUG:root:Running 'make -j32 OUT_DIR=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src'
autotest-chrome-9999: DEBUG:root:[stdout] protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto
autotest-chrome-9999: DEBUG:root:[stdout] protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto
autotest-chrome-9999: DEBUG:root:[stdout] protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto
autotest-chrome-9999: DEBUG:root:[stdout] protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto
autotest-chrome-9999:  * ACCESS DENIED:  open_wr:      /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: ERROR:root:[stderr] /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py: Permission deniedmake: *** [Makefile:23: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py] Error 1
autotest-chrome-9999: ERROR:root:[stderr] make: *** Waiting for unfinished jobs....
autotest-chrome-9999:   * * ACCESS DENIEDACCESS DENIED:  open_wr:  open_wr: :          /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: 
autotest-chrome-9999:  * ACCESS DENIED:  open_wr:      /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: ERROR:root:[stderr] /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py: : Permission deniedPermission denied/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py: Permission deniedmake: *** [Makefile:23: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/device_management_backend_pb2.py] Error 1
autotest-chrome-9999: ERROR:root:[stderr] make: *** [Makefile:23: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_extension_policy_pb2.py] Error 1
autotest-chrome-9999: ERROR:root:[stderr] make: *** [Makefile:23: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/cloud_policy_pb2.py] Error 1
autotest-chrome-9999: ERROR:root:Command <make -j32 OUT_DIR=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src> failed, rc=2, Command returned non-zero exit status
autotest-chrome-9999: * Command: 
autotest-chrome-9999:     make -j32 OUT_DIR=/build/wolf/tmp/portage/chromeos-base/autotest-
autotest-chrome-9999:     chrome-9999/work/autotest-work/client/cros/enterprise/src
autotest-chrome-9999: Exit status: 2
autotest-chrome-9999: Duration: 0.0407731533051
autotest-chrome-9999: 
autotest-chrome-9999: stdout:
autotest-chrome-9999: protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto
autotest-chrome-9999: protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto
autotest-chrome-9999: protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto
autotest-chrome-9999: protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto
autotest-chrome-9999: stderr:
autotest-chrome-9999: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py: Permission deniedmake: *** [Makefile:23: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py] Error 1
autotest-chrome-9999: make: *** Waiting for unfinished jobs....
autotest-chrome-9999: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py: : Permission deniedPermission denied/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py: Permission deniedmake: *** [Makefile:23: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/device_management_backend_pb2.py] Error 1
autotest-chrome-9999: make: *** [Makefile:23: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/
client/cros/enterprise/src/chrome_extension_policy_pb2.py] Error 1
autotest-chrome-9999: make: *** [Makefile:23: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/cloud_policy_pb2.py] Error 1
autotest-chrome-9999:  * ERROR: chromeos-base/autotest-chrome-9999::chromiumos failed (compile phase):
autotest-chrome-9999:  *   Tests failed to build.
autotest-chrome-9999:  * 
autotest-chrome-9999:  * Call stack:
autotest-chrome-9999:  *     ebuild.sh, line   93:  Called src_compile
autotest-chrome-9999:  *   environment, line 3664:  Called autotest_src_compile
autotest-chrome-9999:  *   environment, line  754:  Called die
autotest-chrome-9999:  * The specific snippet of code:
autotest-chrome-9999:  *           ( GRAPHICS_BACKEND="$graphics_backend" LOGNAME=${SUDO_USER} client/bin/autotest_client --quiet --client_test_setup=$(pythonify_test_list ${TESTS}) || ! use buildcheck || die "Tests failed to build." ) | sed -e "s/\(INFO:root:setup\)/${GREEN}* \1${NORMAL}/" -e "s/\(ERROR:root:\[.*\]\)/${RED}\1${NORMAL}/";
autotest-chrome-9999:  * 
autotest-chrome-9999:  * If you need support, post the output of `emerge --info '=chromeos-base/autotest-chrome-9999::chromiumos'`,
autotest-chrome-9999:  * the complete build log and the output of `emerge -pqv '=chromeos-base/autotest-chrome-9999::chromiumos'`.
autotest-chrome-9999:  * The complete build log is located at '/build/wolf/tmp/portage/logs/chromeos-base:autotest-chrome-9999:20161018-223821.log'.
autotest-chrome-9999:  * For convenience, a symlink to the build log is located at '/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/temp/build.log'.
autotest-chrome-9999:  * The ebuild environment file is located at '/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/temp/environment'.
autotest-chrome-9999:  * Working directory: '/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work'
autotest-chrome-9999:  * S: '/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-chrome-9999'
autotest-chrome-9999:  * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
autotest-chrome-9999:  * LOG FILE: "/var/log/sandbox/sandbox-18633.log"
autotest-chrome-9999:  * 
autotest-chrome-9999: VERSION 1.0
autotest-chrome-9999: FORMAT: F - Function called
autotest-chrome-9999: FORMAT: S - Access Status
autotest-chrome-9999: FORMAT: P - Path as passed to function
autotest-chrome-9999: FORMAT: A - Absolute Path (not canonical)
autotest-chrome-9999: FORMAT: R - Canonical Path
autotest-chrome-9999: FORMAT: C - Command Line
autotest-chrome-9999: 
autotest-chrome-9999: F: open_wr
autotest-chrome-9999: S: deny
autotest-chrome-9999: P: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: A: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: R: /build/wolf/usr/local/build/autotest/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: C: protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto 
autotest-chrome-9999: 
autotest-chrome-9999: F: 
autotest-chrome-9999: F: open_wropen_wr
autotest-chrome-9999: S: 
autotest-chrome-9999: S: denydeny
autotest-chrome-9999: P: 
autotest-chrome-9999: P: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: A: 
autotest-chrome-9999: A: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: R: 
autotest-chrome-9999: R: /build/wolf/usr/local/build/autotest/client/cros/enterprise/src/chrome_device_policy_pb2.py/build/wolf/usr/local/build/autotest/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: C: 
autotest-chrome-9999: C: protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto
/build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto 
autotest-chrome-9999: 
autotest-chrome-9999: 
autotest-chrome-9999: F: open_wr
autotest-chrome-9999: S: deny
autotest-chrome-9999: P: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: A: /build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: R: /build/wolf/usr/local/build/autotest/client/cros/enterprise/src/chrome_device_policy_pb2.py
autotest-chrome-9999: C: protoc --proto_path=/build/wolf/usr/share/protofiles --python_out=/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work/client/cros/enterprise/src /build/wolf/usr/share/protofiles/chrome_device_policy.proto /build/wolf/usr/share/protofiles/device_management_backend.proto /build/wolf/usr/share/protofiles/chrome_extension_policy.proto /build/wolf/usr/share/protofiles/cloud_policy.proto 
autotest-chrome-9999:  * --------------------------------------------------------------------------------
autotest-chrome-9999: >>> Failed to emerge chromeos-base/autotest-chrome-9999 for /build/wolf/, Log file:
autotest-chrome-9999: >>>  '/build/wolf/tmp/portage/logs/chromeos-base:autotest-chrome-9999:20161018-223821.log'
autotest-chrome-9999: 
autotest-chrome-9999:  * Messages for package chromeos-base/autotest-chrome-9999 merged to /build/wolf/:
autotest-chrome-9999: 
autotest-chrome-9999:  * ERROR: chromeos-base/autotest-chrome-9999::chromiumos failed (compile phase):
autotest-chrome-9999:  *   Tests failed to build.
autotest-chrome-9999:  * 
autotest-chrome-9999:  * Call stack:
autotest-chrome-9999:  *     ebuild.sh, line   93:  Called src_compile
autotest-chrome-9999:  *   environment, line 3664:  Called autotest_src_compile
autotest-chrome-9999:  *   environment, line  754:  Called die
autotest-chrome-9999:  * The specific snippet of code:
autotest-chrome-9999:  *           ( GRAPHICS_BACKEND="$graphics_backend" LOGNAME=${SUDO_USER} client/bin/autotest_client --quiet --client_test_setup=$(pythonify_test_list ${TESTS}) || ! use buildcheck || die "Tests failed to build." ) | sed -e "s/\(INFO:root:setup\)/${GREEN}* \1${NORMAL}/" -e "s/\(ERROR:root:\[.*\]\)/${RED}\1${NORMAL}/";
autotest-chrome-9999:  * 
autotest-chrome-9999:  * If you need support, post the output of `emerge --info '=chromeos-base/autotest-chrome-9999::chromiumos'`,
autotest-chrome-9999:  * the complete build log and the output of `emerge -pqv '=chromeos-base/autotest-chrome-9999::chromiumos'`.
autotest-chrome-9999:  * The complete build log is located at '/build/wolf/tmp/portage/logs/chromeos-base:autotest-chrome-9999:20161018-223821.log'.
autotest-chrome-9999:  * For convenience, a symlink to the build log is located at '/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/temp/build.log'.
autotest-chrome-9999:  * The ebuild environment file is located at '/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/temp/environment'.
autotest-chrome-9999:  * Working directory: '/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-work'
autotest-chrome-9999:  * S: '/build/wolf/tmp/portage/chromeos-base/autotest-chrome-9999/work/autotest-chrome-9999'
=== Complete: job autotest-chrome-9999 (0m23.0s) ===
Failed chromeos-base/autotest-chrome-9999 (in 0m23.0s). Your build has failed.
Pending 4/39, [Time 15:38:43 | Elapsed 7m42.3s | Load 2.93 3.74 3.3]
Packages failed:
chromeos-base/autotest-chrome-9999
ERROR   : Tue Oct 18 15:38:44 PDT 2016
ERROR   :  PGID  PPID   PID     ELAPSED     TIME %CPU COMMAND
ERROR   :    10     6    10    01:13:29 00:00:00  0.0 -bash
ERROR   : 18331    10 18331       08:44 00:00:00  0.0  \_ /bin/bash ./build_packages --board=wolf
ERROR   : 18331 18331 19043       00:00 00:00:00  0.0      \_ /bin/bash ./build_packages --board=wolf
ERROR   : 18331 19043 19044       00:00 00:00:00  0.0          \_ ps f -o pgid,ppid,pid,etime,cputime,%cpu,command
ERROR   : 18117     1 18128       10:57 00:00:00  0.0 /usr/bin/ssh -a -x -N -o ControlMaster=yes -o ControlPath=/tmp/_autotmp_yKAYlessh-master/socket -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ConnectTimeout=30 -o ServerAliveInterval=900 -o ServerAliveCountMax=3 -o ConnectionAttempts=4 -o Protocol=2 -l root -p 22 100.96.48.146
ERROR   :  4483     1  4494       29:16 00:00:00  0.0 /usr/bin/ssh -a -x -N -o ControlMaster=yes -o ControlPath=/tmp/_autotmp_f6Xs2Essh-master/socket -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ConnectTimeout=30 -o ServerAliveInterval=900 -o ServerAliveCountMax=3 -o ConnectionAttempts=4 -o Protocol=2 -l root -p 22 100.96.48.146
ERROR   : Arguments of 18331: ./build_packages '--board=wolf'
ERROR   : Backtrace:  (most recent call is last)
ERROR   :  build_packages:265:main(), called: die_err_trap  
ERROR   : 
ERROR   : Command failed:
ERROR   :   Command '( set -o pipefail; sudo -E "${EMERGE_CMD[@]}" "${EMERGE_FLAGS[@]}" "${PACKAGES[@]}" | tee "${tmpfile}" )' exited with nonzero code: 1
(cr) ((a171839...)) scunningham@xot ~/trunk/src/scripts $ 


The Logs:
As instructed above, here is the output from $ emerge --info '=chromeos-base/autotest-chrome-9999::chromiumos' and $ emerge -pqv '=chromeos-base/autotest-chrome-9999::chromiumos'.

$ emerge --info '=chromeos-base/autotest-chrome-9999::chromiumos'
Portage 2.2.12-r9 (python 2.7.10-final-0, !/usr/local/portage/chromiumos/profiles/default/linux/amd64/10.0/sdk, gcc-4.9.2, glibc-2.19-r13, 3.13.0-96-generic x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.13.0-96-generic-x86_64-Intel-R-_Xeon-R-_CPU_E5-2690_0_@_2.90GHz-with-glibc2.2.5
KiB Mem:    65898456 total,   7515052 free
KiB Swap:   67039228 total,  66758464 free
Timestamp of tree: Unknown
ld GNU ld (binutils-2.25.51-r59-6422a80df992e4542dbd4fb70a04f316065674af_cos_gg) 2.25.51.20141117
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p42-r2
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.10::chromiumos, 3.3.5-r1
dev-util/ccache:          3.2.4
dev-util/cmake:           3.5.2-r1
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2::chromiumos
sys-apps/sandbox:         2.11-r2
sys-devel/autoconf:       2.69
sys-devel/automake:       1.10.3-r1, 1.11.6-r1, 1.13.4, 1.14.1
sys-devel/binutils:       2.25.51-r59::chromiumos
sys-devel/gcc:            4.9.2-r141::chromiumos
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.6
sys-devel/make:           4.2.1
sys-kernel/linux-headers: 4.0-r5::chromiumos (virtual/os-headers)
sys-libs/glibc:           2.19-r13::chromiumos
Repositories: portage-stable crossdev chromiumos eclass-overlay chromeos
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @CHROMEOS"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc/hosts /etc/locale.gen /etc/localtime /etc/make.conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/lib/portage/distfiles"
EMERGE_DEFAULT_OPTS="--oneshot"
FCFLAGS=""
FEATURES="allow-missing-manifests assume-digests binpkg-logs buildpkg clean-logs config-protect-if-modified distlocks fixlafiles news parallel-fetch parallel-install protect-owned sandbox sfperms unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS=""
INSTALL_MASK="   /usr/lib*/*.la   /etc/init.d /etc/conf.d   /etc/logrotate.d "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed"
MAKEOPTS="-j32"
PKGDIR="/var/lib/portage/pkgs"
PORTAGE_BUNZIP2_COMMAND="pbunzip2 --ignore-trailing-garbage=1"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/local/portage/stable"
PORTDIR_OVERLAY="/usr/local/portage/crossdev /usr/local/portage/chromiumos /usr/local/portage/eclass-overlay /mnt/host/source/src/private-overlays/chromeos-overlay"
USE="acl amd64 bzip2 cros_host crypt cxx dri expat fortran hardened iconv internal ipv6 mmx mmxext modules mudflap multilib ncurses nls nptl nptlonly openmp pic pie python readline sse sse2 ssl sysfs transparent_hugepage unicode vaapi xattr xorg zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 mips mips64 mips64el mipsel x86_64" QEMU_USER_TARGETS="aarch64 arm i386 mips mips64 mips64el mipsel x86_64" RUBY_TARGETS="ruby19 ruby18" TTY_CONSOLE="tty2" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON


emerge -pqv '=chromeos-base/autotest-chrome-9999::chromiumos'
The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by =chromeos-base/autotest-chrome-9999::chromiumos (argument)
=chromeos-base/autotest-chrome-9999 **

emerge: there are no ebuilds to satisfy ">=dev-python/cython-0.16".
(dependency required by "app-accessibility/brltty-5.4::chromiumos[python]" [ebuild])
(dependency required by "chromeos-base/chromeos-chrome-56.0.2895.0_rc-r1::chromiumos[accessibility]" [ebuild])
(dependency required by "chromeos-base/autotest-chrome-9999::chromiumos" [ebuild])
(dependency required by "=chromeos-base/autotest-chrome-9999::chromiumos" [argument])



Scott Cunningham | Lead Test Engineer | Chrome OS Enterprise / Education | 650.253.1810

Mike Frysinger

unread,
Oct 20, 2016, 7:14:47 PM10/20/16
to Scott Cunningham, Chromium OS dev
i'm not that familiar with autotest, but emerge failing is WAI: ebuilds should not be writing to paths outside of $WORKDIR, especially not to source paths like /build/wolf/usr/local/build/autotest/....  so whatever is trying to write to that path directly is broken and needs fixing.
-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en


Scott Cunningham

unread,
Oct 27, 2016, 6:43:14 PM10/27/16
to Chromium OS dev, Mike Frysinger
Based on some helpful feedback, I'm recasting my question. Sorry for the do-over.

Problem: The proliferation of duplicate src/Makefile for policy_* tests, and their resultant python protobuf binding files, is a) increasing the size of the autotest directory download to DUTs, and b) lengthening the time it takes to emerge autotests. A single src directory grows to about 573K after Makefile is run. With 22 tests (currently), this ends up consuming 12.54 MB. As many more tests are coming, this problem will only get worse. Is this a valid concern? If not, let me know, and I'll stop trying to fix it.

If this is valid a concern, then my idealized solution is to make all policy_* tests, and the policy_testserver they invoke, share a common src directory that contains the Makefile and compiled protobuf binding files. This way, only one instance of the src directory needs to exist, get compiled, and be copied down to the DUT, when any policy_* test is run. Is this a realistic solution?  If not, please let me know what would be.

Solution: Assuming my proposed solution is feasible, there are two bits of news I think are good:
1) the policy_testserver.py is already in the test image, at /usr/local/telemetry/src/chrome/browser/policy/test, and
2) the policy *.proto files are already in the test image, at /usr/local/share/protofiles and /user/share/protofiles.

This leaves at least two programming problems I need to solve. Both are beyond my current knowledge. They are:
1) How do I get build_packages (and emerge) to execute the Makefile stored in the shared source location (e.g., .../src/third_party/autotest/autotest/files/client/cros/enterprise/src/Makefile), so that it creates therein the protobuf binding files (e.g., cloud_policy_pb2.py and .pyc, chrome_device_policy_pb2.py and .pyc, etc...)
2) How do I make policy_testserver.py import the protobuf binding files from *that* location, rather than from the self.srcdir directory of the running test.

Is there anyone here who know how to do one or both of these things, and who would be willing to explain it, and perhaps help me work through solving it?


Scott Cunningham | Lead Test Engineer | Chrome OS Enterprise / Education | 650.253.1810

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages