syntax error: unexpected 'newline' in .config file in android vts

821 Views Asked by At

Currently, I am running one VTS module VtsHalGnssExtV1_0TargetTest.

But I am getting an error syntax error: unexpected 'newline'. But the tests ran correctly.

=======================================================
=============== Summary ===============
Total Run time: 5m 4s
0/2 modules completed
Module(s) with run failure(s):
    armeabi-v7a VtsHalGnssExtV1_0TargetTest: VtsHalGnssExtV1_0TargetTest.config did not report any run:
/data/local/tmp/VtsHalGnssExtV1_0TargetTest/VtsHalGnssExtV1_0TargetTest.config[1]: syntax error: unexpected 'newline'

    arm64-v8a VtsHalGnssExtV1_0TargetTest: VtsHalGnssExtV1_0TargetTest.config did not report any run:
/data/local/tmp/VtsHalGnssExtV1_0TargetTest/VtsHalGnssExtV1_0TargetTest.config[1]: syntax error: unexpected 'newline'

Total Tests       : 12
PASSED            : 6
FAILED            : 6
IMPORTANT: Some modules failed to run to completion, test counts may be inaccurate.
============== End of Results ==============
============================================

I am using the below adb version:

$ adb version
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5~18.04
Installed as /usr/lib/android-sdk/platform-tools/adb

Below is my VtsHalGnssExtV1_0TargetTest.config file:

<!-- Test config are updated with new class and preparer available in vts 11 -->

<configuration description="Config for VTS VtsHalGnssExtV1_0TargetTest for complete testing.">
    <option name="test-suite-tag" value="apct" />
    <option name="test-suite-tag" value="apct-native" />

<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
</target_preparer>

<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
    <option name="cleanup" value="true" />
    <option name="push" value="VtsHalGnssExtV1_0TargetTest->/data/local/tmp/VtsHalGnssExtV1_0TargetTest" />
</target_preparer>

<test class="com.android.tradefed.testtype.GTest" >
    <option name="native-test-device-path" value="/data/local/tmp" />
    <option name="module-name" value="VtsHalGnssExtV1_0TargetTest" />
    <option name="native-test-timeout" value="600000" />
</test>

Currently, I am not able to find any newline used in my config file as pointed. Am I missing something.

3

There are 3 best solutions below

0
On

Generally, this issue happens if you copied the android-vts.zip file to Windows and extracted it.

The difference is that an execution file mode bit (x) was set for the .config file automatically. But why and how the test was affected by this mode bit is unclear.

For my situation, removing this 'x' bit from the .config file works well. So, give it a try:

chmod -x testcases/VtsHalGnssExtV1_0TargetTest.config

And then, rerun your test.

0
On

please check if you have modified your vts-tf file??? i have edited and added adb path earlier, so it dint work for me either. faced same issue so i have deleted script and downloaded again and ran without modifying anything then it worked fine for me

0
On

I have noticed that this is a strange problem and could not solve it with permission and re-download of VTS suite also. Tried everything even adb aspects. I suspect that this is due to some linux package compatibility issues. I have always solved it only by re-installing the linux and related python packages. Suspect that some package update might be triggering it.