tametika / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Android - android/test_runner.py ImportError: No module named dependency_manager #570

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. build android apk
GYP_DEFINES="OS=android" GYP_CROSSCOMPILE=1 ./gyp_libyuv
ninja -j7 -C out/Debug libyuv_unittest_apk

2. run with test_runner
export GYP_DEFINES="OS=android"

 util/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=*
Traceback (most recent call last):
  File "util/android/test_runner.py", line 27, in <module>
    import test_runner  # pylint: disable=W0406
  File "/usr/local/google/home/fbarchard/build/libyuva/libyuv/build/android/test_runner.py", line 19, in <module>
    import devil_chromium
  File "/usr/local/google/home/fbarchard/build/libyuva/libyuv/build/android/devil_chromium.py", line 15, in <module>
    from devil import devil_env
  File "/usr/local/google/home/fbarchard/build/libyuva/libyuv/build/android/devil/devil_env.py", line 31, in <module>
    import dependency_manager # pylint: disable=import-error
ImportError: No module named dependency_manager

Original issue reported on code.google.com by fbarch...@google.com on 18 Feb 2016 at 6:35

GoogleCodeExporter commented 8 years ago
IIRC you need to do the changes done in 
https://codereview.webrtc.org/1503883002 to solve this.

Original comment by kjellan...@google.com on 18 Feb 2016 at 3:25

GoogleCodeExporter commented 8 years ago
still not working.  for a test, I ran one of the webrtc tests on nexus 9 and 
thats ok

webrtc/build/android/test_runner.py gtest -s modules_unittests --verbose 
--gtest_filter=RtpRtcpAPITest.SSRC:RtpRtcpRtcpTest.*

I   13.177s run_tests_on_device(HT4A2JT03762)  [==========] Running 4 tests 
from 2 test cases.
I   13.178s run_tests_on_device(HT4A2JT03762)  [----------] Global test 
environment set-up.
I   13.178s run_tests_on_device(HT4A2JT03762)  [----------] 1 test from 
RtpRtcpAPITest
I   13.178s run_tests_on_device(HT4A2JT03762)  [ RUN      ] RtpRtcpAPITest.SSRC
I   13.178s run_tests_on_device(HT4A2JT03762)  [       OK ] RtpRtcpAPITest.SSRC 
(0 ms)
I   13.178s run_tests_on_device(HT4A2JT03762)  [----------] 1 test from 
RtpRtcpAPITest (0 ms total)
I   13.178s run_tests_on_device(HT4A2JT03762)  
I   13.178s run_tests_on_device(HT4A2JT03762)  [----------] 3 tests from 
RtpRtcpRtcpTest
I   13.178s run_tests_on_device(HT4A2JT03762)  [ RUN      ] 
RtpRtcpRtcpTest.RTCP_PLI_RPSI
I   13.179s run_tests_on_device(HT4A2JT03762)  [       OK ] 
RtpRtcpRtcpTest.RTCP_PLI_RPSI (0 ms)
I   13.179s run_tests_on_device(HT4A2JT03762)  [ RUN      ] 
RtpRtcpRtcpTest.RTCP_CNAME
I   13.179s run_tests_on_device(HT4A2JT03762)  [       OK ] 
RtpRtcpRtcpTest.RTCP_CNAME (0 ms)
I   13.179s run_tests_on_device(HT4A2JT03762)  [ RUN      ] 
RtpRtcpRtcpTest.RemoteRTCPStatRemote
I   13.179s run_tests_on_device(HT4A2JT03762)  [       OK ] 
RtpRtcpRtcpTest.RemoteRTCPStatRemote (1 ms)
I   13.179s run_tests_on_device(HT4A2JT03762)  [----------] 3 tests from 
RtpRtcpRtcpTest (2 ms total)
I   13.179s run_tests_on_device(HT4A2JT03762)  
I   13.180s run_tests_on_device(HT4A2JT03762)  [----------] Global test 
environment tear-down
I   13.180s run_tests_on_device(HT4A2JT03762)  [==========] 4 tests from 2 test 
cases ran. (2 ms total)
I   13.180s run_tests_on_device(HT4A2JT03762)  [  PASSED  ] 4 tests.
I   13.180s run_tests_on_device(HT4A2JT03762)  
I   13.180s run_tests_on_device(HT4A2JT03762)  OK (4 tests)
I   13.180s run_tests_on_device(HT4A2JT03762)  Finished running tests on this 
device.

Original comment by fbarch...@google.com on 19 Feb 2016 at 1:58

GoogleCodeExporter commented 8 years ago
I added the symlinks, and that fixed the ImportError.

Below is the output when trying to run libyuv tests.
The only suspect message I see is:
W    3.443s Main  No isolate file provided. No data deps will be pushed.
there is no data files, but are isolate files needed now?

fbarchard@fbarchard-linux:~/build/libyuva/libyuv$ util/android/test_runner.py 
gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=*
I    0.098s TimeoutThread-1-for-MainThread  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb devices
I    3.344s Main  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/build-tools/23.0.1/aapt dump xmltree 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/out/Release/libyuv_unittes
t_apk/libyuv_unittest-debug.apk AndroidManifest.xml
W    3.443s Main  No isolate file provided. No data deps will be pushed.
I    3.446s TimeoutThread-1-for-individual_device_set_up(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( ( getprop 
)>/data/local/tmp/temp_file-4137652b4b9f0 );echo %$?'
I    3.595s TimeoutThread-1-for-individual_device_set_up(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 pull 
/data/local/tmp/temp_file-4137652b4b9f0 /tmp/tmpFkJ417/tmp_ReadFileWithPull
I    3.771s TimeoutThread-1-for-individual_device_set_up(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( pm path 
org.chromium.native_test );echo %$?'
I    3.772s TimeoutThread-1-for-delete_temporary_file(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell 'rm -f 
/data/local/tmp/temp_file-4137652b4b9f0'
I    4.515s calculate_host_checksums  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/out/Release/md5sum_bin_hos
t 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/out/Release/libyuv_unittes
t_apk/libyuv_unittest-debug.apk
I    4.518s calculate_device_checksums  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( 
a=/data/local/tmp/md5sum/md5sum_bin;! [[ $(ls -l $a) = *505348* ]]&&exit 
2;export LD_LIBRARY_PATH=/data/local/tmp/md5sum;$a 
/data/app/org.chromium.native_test-1/base.apk;: );echo %$?'
I    4.594s calculate_device_checksums  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( su 0 ls /root && ! ls /root 
);echo %$?'
I    4.660s calculate_device_checksums  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( rm -rf /data/local/tmp/md5sum 
);echo %$?'
I    4.743s calculate_device_checksums  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 push 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/out/Release/md5sum_dist 
/data/local/tmp/md5sum
I    4.897s calculate_device_checksums  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( 
a=/data/local/tmp/md5sum/md5sum_bin;! [[ $(ls -l $a) = *505348* ]]&&exit 
2;export LD_LIBRARY_PATH=/data/local/tmp/md5sum;$a 
/data/app/org.chromium.native_test-1/base.apk;: );echo %$?'
I    5.062s TimeoutThread-1-for-individual_device_set_up(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 install -r 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/out/Release/libyuv_unittes
t_apk/libyuv_unittest-debug.apk
I    6.763s TimeoutThread-1-for-individual_device_set_up(HT4A2JT03762)  Setting 
permissions for org.chromium.native_test.
I    6.764s TimeoutThread-1-for-individual_device_set_up(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( pm grant 
org.chromium.native_test android.permission.CAMERA;pm grant 
org.chromium.native_test android.permission.RECORD_AUDIO;pm grant 
org.chromium.native_test android.permission.WRITE_EXTERNAL_STORAGE;pm grant 
org.chromium.native_test android.permission.READ_EXTERNAL_STORAGE );echo %$?'
I    8.888s TimeoutThread-1-for-individual_device_set_up(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( echo $EXTERNAL_STORAGE );echo 
%$?'
I    8.956s TimeoutThread-1-for-list_tests(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell '( ( p=org.chromium.native_test;am 
instrument -w -e "$p".NativeTestInstrumentationTestRunner.ShardNanoTimeout 
20000000000 -e "$p".NativeTestInstrumentationTestRunner.NativeTestActivity 
"$p".NativeUnitTestActivity -e "$p".NativeTestActivity.CommandLineFlags 
--gtest_list_tests "$p"/"$p".NativeTestInstrumentationTestRunner 
)>/data/local/tmp/temp_file-c1b0460188c51 );echo %$?'
I    9.853s TimeoutThread-1-for-list_tests(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 pull 
/data/local/tmp/temp_file-c1b0460188c51 /tmp/tmpG8OHkB/tmp_ReadFileWithPull
I    9.992s TimeoutThread-1-for-delete_temporary_file(HT4A2JT03762)  [host]> 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/third_party/android_tools/
sdk/platform-tools/adb -s HT4A2JT03762 shell 'rm -f 
/data/local/tmp/temp_file-c1b0460188c51'
C   10.058s Main  
********************************************************************************
C   10.059s Main  Summary
C   10.059s Main  
********************************************************************************
C   10.059s Main  [==========] 0 tests ran.
C   10.059s Main  [  PASSED  ] 0 tests.
C   10.059s Main  
********************************************************************************
I   10.076s Main  Wrote device cache: 
/usr/local/google/home/fbarchard/build/libyuva/libyuv/out/Release/device_cache_H
T4A2JT03762.json

Original comment by fbarch...@google.com on 19 Feb 2016 at 2:01

GoogleCodeExporter commented 8 years ago
That might be the case. For WebRTC we have isolate files for all our Android 
tests, even the ones that don't need additional resources. The isolate file 
might be needed anyway since the binary itself is also listed in it.

You should be able to figure out how to create one for libyuv_unittests by 
looking at how we do in WebRTC. If not, let me know and I can help out.

Original comment by kjellan...@google.com on 22 Feb 2016 at 5:35