#NEWLINE# def test_clean_libraries( self ) : #NEWLINE# #INDENT# d = android . BuildEnvironment . build_defaults ( ) #NEWLINE# b = android . BuildEnvironment ( d ) #NEWLINE# b . clean = True #NEWLINE# m = common_test . RunCommandMock ( self ) #NEWLINE# b . run_subprocess = m #NEWLINE# ndk_build = os . path . join ( b . ndk_home , 'ndk-build' ) #NEWLINE# l = 'libfoo' #NEWLINE# lpath = os . path . abspath ( os . path . join ( b . project_directory , l ) ) #NEWLINE# expect = [ ndk_build , ( '-j' + str ( ( ( platform . mac_ver ( ) [ 0 ] and 1 ) or b . cpu_count ) ) ) , '-C' , lpath , 'clean' ] #NEWLINE# m . expect ( expect ) #NEWLINE# b . build_android_libraries ( [ l ] , check_ndk_install_path = False ) #NEWLINE# b . verbose = True #NEWLINE# expect . append ( 'V=1' ) #NEWLINE# m . expect ( expect ) #NEWLINE# b . build_android_libraries ( [ l ] , check_ndk_install_path = False ) #NEWLINE# expect . append ( ( 'NDK_OUT=%s' % lpath ) ) #NEWLINE# m . expect ( expect ) #NEWLINE# b . build_android_libraries ( [ l ] , output = l , check_ndk_install_path = False ) #NEWLINE# b . make_flags = '-DFOO -DBAR -DBAZ' #NEWLINE# flaglist = [ '-DFOO' , '-DBAR' , '-DBAZ' ] #NEWLINE# expect += expect #NEWLINE# m . expect ( expect ) #NEWLINE# b . build_android_libraries ( [ l ] , output = l , check_ndk_install_path = False ) #NEWLINE# common . _find_executable = self . find_executable #NEWLINE# b . ndk_home = '/dev/null' #NEWLINE# with self . assertRaises ( common . ToolPathError ) : #NEWLINE# #INDENT# b . build_android_libraries ( [ l ] , output = l , check_ndk_install_path = False )