Add supported_os checking and test cases.