Adjust common script and related test cases