Bug 10379

Summary: FAIL: test_devtool_update_recipe_local_files
Product: [QA/Testing] Build Testing Reporter: Joshua Lock <joshuagloe>
Component: generalAssignee: Stephano Cetola <stephano>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: bluelightning, richard.purdie
Version: 2.2   
Target Milestone: 2.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: YP 2.2 M4 RC1 BUILD BLOCKING BUG
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 10326    

Description Joshua Lock 2016-10-05 08:41:46 UTC
nightly-oe-selftest builder failed in "Running oe-selftest" with current master-next:

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/698/steps/Running%20oe-selftest/logs/stdio

======================================================================
FAIL: test_devtool_update_recipe_local_files (oeqa.selftest.devtool.DevtoolTests)
Check that local source files are copied over instead of patched
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/devtool.py", line 875, in test_devtool_update_recipe_local_files
    runCmd('echo "/* Foobar */" >> oe-local-files/makedevs.c', cwd=tempdir)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/commands.py", line 114, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, result.output))
AssertionError: Command 'echo "/* Foobar */" >> oe-local-files/makedevs.c' returned non-zero exit status 2:
/bin/sh: 1: cannot create oe-local-files/makedevs.c: Directory nonexistent
Comment 1 Richard Purdie 2016-10-05 09:04:51 UTC
This is from Stephano's patch "devtool: modify command fails to ignore source files" and can be reproduced with "oe-selftest -r devtool.DevtoolTests.test_devtool_update_recipe_local_files"
Comment 2 Stephano Cetola 2016-10-05 14:08:12 UTC
In the test, the source path ($S) is the same as the working directory ($WORKDIR), so the check that I added always prevents files from being added to oe-local-files.

I'm looking into the best way to fix this now.
Comment 3 Stephano Cetola 2016-10-06 03:59:55 UTC
I submitted a patch which fixed the error and I believe solves the problem. I double checked with Paul and he agrees that this should work fine.