diff --git a/.gitignore b/.gitignore index 2c6cd49a5..a62397e46 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,7 @@ tests/*$py.class tests/build.xml tests/project.properties ant_password.properties +liblinphone_tester/liblinphonetester_* +liblinphone_tester/tests.output +tests/linphonetester_* +tests/tests.output diff --git a/liblinphone_tester/src/org/linphone/tester/LogsActivity.java b/liblinphone_tester/src/org/linphone/tester/LogsActivity.java index 97a6ef0dc..40c7062cf 100644 --- a/liblinphone_tester/src/org/linphone/tester/LogsActivity.java +++ b/liblinphone_tester/src/org/linphone/tester/LogsActivity.java @@ -23,9 +23,10 @@ public class LogsActivity extends Activity { @Override public void run() { - String path = mLogsActivity.getFilesDir().getAbsolutePath()+"/config_files"; + String res_path = mLogsActivity.getFilesDir().getAbsolutePath()+"/config_files"; + String write_path = mLogsActivity.getCacheDir().getPath(); tester = new TesterLogger(mLogsActivity); - List list = new LinkedList(Arrays.asList(new String[]{"tester", "--verbose", "--resource-dir", path})); + List list = new LinkedList(Arrays.asList(new String[]{"tester", "--verbose", "--resource-dir", res_path, "--writable-dir", write_path})); list.addAll(Arrays.asList(mArgs)); String[] array = list.toArray(new String[list.size()]); tester.run(array); @@ -37,7 +38,7 @@ public class LogsActivity extends Activity { }); } } - + private static String join(String [] array, String separator) { String ret = ""; for(int i = 0; i < array.length; ++i) { @@ -48,7 +49,7 @@ public class LogsActivity extends Activity { } return ret; } - + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -75,7 +76,7 @@ public class LogsActivity extends Activity { getMenuInflater().inflate(R.menu.activity_logs, menu); return true; } - + public void addLog(int level, String message) { mLogs += message; ((TextView)findViewById(R.id.textView1)).append(message); @@ -86,7 +87,7 @@ public class LogsActivity extends Activity { finish(); } } - + public void done() { } } diff --git a/liblinphone_tester/src/org/linphone/tester/TestUnit.java b/liblinphone_tester/src/org/linphone/tester/TestUnit.java index 5683995e3..2e2f00707 100644 --- a/liblinphone_tester/src/org/linphone/tester/TestUnit.java +++ b/liblinphone_tester/src/org/linphone/tester/TestUnit.java @@ -16,28 +16,28 @@ public class TestUnit extends AndroidTestCase { private String mSuite; private String mTest; static Boolean isAssetCopied=false; - + public TestUnit(String suite, String test) { mSuite = suite; mTest = test; setName(suite + "/" + test); } - + public TestUnit(String name) { - String[] tab = name.split("/"); + String[] tab = name.split("/"); mSuite = tab[0]; mTest = tab[1]; setName(name); } - + static public void copyAssetsFromPackage(Context ctx) throws IOException { copyAssetsFromPackage(ctx,"config_files"); } - - + + public static void copyAssetsFromPackage(Context ctx,String fromPath) throws IOException { new File(ctx.getFilesDir().getPath()+"/"+fromPath).mkdir(); - + for (String f :ctx.getAssets().list(fromPath)) { String current_name=fromPath+"/"+f; InputStream lInputStream; @@ -50,8 +50,8 @@ public class TestUnit extends AndroidTestCase { continue; } FileOutputStream lOutputStream = new FileOutputStream(new File(ctx.getFilesDir().getPath()+"/"+current_name));//ctx.openFileOutput (fromPath+"/"+f, 0); - - + + int readByte; byte[] buff = new byte[8048]; while (( readByte = lInputStream.read(buff)) != -1) { @@ -75,13 +75,15 @@ public class TestUnit extends AndroidTestCase { protected void tearDown() throws Exception { super.tearDown(); } - + @Override protected void runTest() { - String path = getContext().getFilesDir().getPath()+"/config_files"; + String res_path = getContext().getFilesDir().getPath()+"/config_files"; + String write_path = getContext().getCacheDir().getPath(); Tester tester = new Tester(); - List list = new LinkedList(Arrays.asList(new String[]{"tester", "--verbose", "--resource-dir", path, "--suite", mSuite, "--test", mTest})); + + List list = new LinkedList(Arrays.asList(new String[]{"tester", "--verbose", "--resource-dir", res_path, "--writable-dir", write_path, "--suite", mSuite, "--test", mTest})); String[] array = list.toArray(new String[list.size()]); Assert.assertTrue(tester.run(array) == 0); } -} \ No newline at end of file +} diff --git a/submodules/belle-sip b/submodules/belle-sip index 07233a793..6e76dabb7 160000 --- a/submodules/belle-sip +++ b/submodules/belle-sip @@ -1 +1 @@ -Subproject commit 07233a793594081d5aafc0c6bb14d389dffbfac0 +Subproject commit 6e76dabb7632e0f58e9c43b2cc86ada5f486c761 diff --git a/submodules/linphone b/submodules/linphone index 46547098c..9244a0173 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 46547098cc1f24a394d6aa7c4e7823226ecab0fe +Subproject commit 9244a017373d9ddec9170257fec324fb82cb0800