10x speed improvement for SELinuxNeverallowRulesTest

For each of the 460 tests, SELinuxNeverallowRulesTest pulled, over
ADB/USB, the SELinux policy of the device under test. The policy does
not change. Caching it, makes the test time drop from 50 to 5 seconds.

The effect on SELinuxHostTest (which takes about 20 seconds) is
negligible because those tests pull other files in addition to the
SELinux policy. Future optimization opportunity?

Test: make cts && \
      cts-tradefed run singleCommand cts --skip-device-info \
        --skip-preconditions --skip-connectivity-check \
        --abi arm64-v8a --module CtsSecurityHostTestCases \
        -t android.cts.security.SELinuxNeverallowRulesTest && \
      cts-tradefed run singleCommand cts --skip-device-info \
        --skip-preconditions --skip-connectivity-check \
        --abi arm64-v8a --module CtsSecurityHostTestCases \
        -t android.security.cts.SELinuxHostTest

Change-Id: I0d88b820289cde82a36c693e9c2a1104d5437cf3
2 files changed