Rupert Shuttleworth | 755ceb0 | 2021-08-11 09:20:27 -0400 | [diff] [blame] | 1 | #!/bin/bash -eu |
| 2 | |
| 3 | set -o pipefail |
| 4 | |
| 5 | # Tests of Soong functionality |
| 6 | |
| 7 | source "$(dirname "$0")/lib.sh" |
| 8 | |
| 9 | function test_m_clean_works { |
| 10 | setup |
| 11 | |
| 12 | # Create a directory with files that cannot be removed |
| 13 | mkdir -p out/bad_directory_permissions |
| 14 | touch out/bad_directory_permissions/unremovable_file |
| 15 | # File permissions are fine but directory permissions are bad |
| 16 | chmod a+rwx out/bad_directory_permissions/unremovable_file |
| 17 | chmod a-rwx out/bad_directory_permissions |
| 18 | |
| 19 | run_soong clean |
| 20 | } |
| 21 | |
| 22 | test_m_clean_works |