soong_test.sh 500 B

12345678910111213141516171819202122
  1. #!/bin/bash -eu
  2. set -o pipefail
  3. # Tests of Soong functionality
  4. source "$(dirname "$0")/lib.sh"
  5. function test_m_clean_works {
  6. setup
  7. # Create a directory with files that cannot be removed
  8. mkdir -p out/bad_directory_permissions
  9. touch out/bad_directory_permissions/unremovable_file
  10. # File permissions are fine but directory permissions are bad
  11. chmod a+rwx out/bad_directory_permissions/unremovable_file
  12. chmod a-rwx out/bad_directory_permissions
  13. run_soong clean
  14. }
  15. scan_and_run_tests