diff --git a/.github/workflows/ios-browserstack.yml b/.github/workflows/ios-browserstack.yml index 3b76141..be866e4 100644 --- a/.github/workflows/ios-browserstack.yml +++ b/.github/workflows/ios-browserstack.yml @@ -39,6 +39,9 @@ jobs: - name: Make build dir run: mkdir ddp + - name: Copy test_resources + run: ./copy_test_resources.sh + - name: Inject AccessKey run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' OctopusAppTestUITests/BaseTest.swift diff --git a/.github/workflows/ios-perf.yml b/.github/workflows/ios-perf.yml index a34c79e..11b5d84 100644 --- a/.github/workflows/ios-perf.yml +++ b/.github/workflows/ios-perf.yml @@ -46,7 +46,10 @@ jobs: - name: Make build dir run: mkdir ddp - - name: Inject AppID + - name: Copy test_resources + run: ./copy_test_resources.sh + + - name: Inject AccessKey run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' PerformanceTest/PerformanceTest.swift diff --git a/Package.swift b/Package.swift index ae38bff..5acc12f 100644 --- a/Package.swift +++ b/Package.swift @@ -34,4 +34,4 @@ let package = Package( ] ) ] -) \ No newline at end of file +) diff --git a/binding/ios/OctopusAppTest/.gitignore b/binding/ios/OctopusAppTest/.gitignore index ef9bbed..85753b6 100644 --- a/binding/ios/OctopusAppTest/.gitignore +++ b/binding/ios/OctopusAppTest/.gitignore @@ -17,4 +17,7 @@ build/* *.pbxuser xcuserdata Pods -ddp \ No newline at end of file +ddp + +OctopusAppTestUITests/test_resources/* +!OctopusAppTestUITests/test_resources/.gitkeep \ No newline at end of file diff --git a/binding/ios/OctopusAppTest/OctopusAppTest.xcodeproj/project.pbxproj b/binding/ios/OctopusAppTest/OctopusAppTest.xcodeproj/project.pbxproj index 694412c..7e71b69 100644 --- a/binding/ios/OctopusAppTest/OctopusAppTest.xcodeproj/project.pbxproj +++ b/binding/ios/OctopusAppTest/OctopusAppTest.xcodeproj/project.pbxproj @@ -12,27 +12,13 @@ 1E0064CF27CEEA65006FF6E9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E0064CD27CEEA65006FF6E9 /* Main.storyboard */; }; 1E0064D127CEEA66006FF6E9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1E0064D027CEEA66006FF6E9 /* Assets.xcassets */; }; 1E0064D427CEEA66006FF6E9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1E0064D227CEEA66006FF6E9 /* LaunchScreen.storyboard */; }; - 1E00654527CFF101006FF6E9 /* multiple_keywords.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1E0064F827CEEB98006FF6E9 /* multiple_keywords.wav */; }; 1E00654627CFF260006FF6E9 /* OctopusAppTestUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E0064E827CEEA66006FF6E9 /* OctopusAppTestUITests.swift */; }; 1E5B7B042800D9BE00F8BDDB /* PerformanceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E5B7B032800D9BE00F8BDDB /* PerformanceTest.swift */; }; 1E5B7B072800DD6600F8BDDB /* multiple_keywords.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1E5B7B062800DD6600F8BDDB /* multiple_keywords.wav */; }; 36696536961DE78B3E1C06FA /* (null) in Frameworks */ = {isa = PBXBuildFile; }; C757D8CD28A1C77100F391C8 /* BaseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C757D8CB28A1C77100F391C8 /* BaseTest.swift */; }; C757D8CE28A1C77100F391C8 /* OctopusLanguageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C757D8CC28A1C77100F391C8 /* OctopusLanguageTests.swift */; }; - C757D8D628A1C85200F391C8 /* multiple_keywords_ko.wav in Resources */ = {isa = PBXBuildFile; fileRef = C757D8CF28A1C85100F391C8 /* multiple_keywords_ko.wav */; }; - C757D8D728A1C85200F391C8 /* multiple_keywords_fr.wav in Resources */ = {isa = PBXBuildFile; fileRef = C757D8D028A1C85100F391C8 /* multiple_keywords_fr.wav */; }; - C757D8D828A1C85200F391C8 /* multiple_keywords_it.wav in Resources */ = {isa = PBXBuildFile; fileRef = C757D8D128A1C85100F391C8 /* multiple_keywords_it.wav */; }; - C757D8D928A1C85200F391C8 /* multiple_keywords_pt.wav in Resources */ = {isa = PBXBuildFile; fileRef = C757D8D228A1C85100F391C8 /* multiple_keywords_pt.wav */; }; - C757D8DA28A1C85200F391C8 /* multiple_keywords_ja.wav in Resources */ = {isa = PBXBuildFile; fileRef = C757D8D328A1C85200F391C8 /* multiple_keywords_ja.wav */; }; - C757D8DB28A1C85200F391C8 /* multiple_keywords_es.wav in Resources */ = {isa = PBXBuildFile; fileRef = C757D8D428A1C85200F391C8 /* multiple_keywords_es.wav */; }; - C757D8DC28A1C85200F391C8 /* multiple_keywords_de.wav in Resources */ = {isa = PBXBuildFile; fileRef = C757D8D528A1C85200F391C8 /* multiple_keywords_de.wav */; }; - C757D8E428A1D08B00F391C8 /* octopus_params_ko.pv in Resources */ = {isa = PBXBuildFile; fileRef = C757D8DD28A1D08B00F391C8 /* octopus_params_ko.pv */; }; - C757D8E528A1D08B00F391C8 /* octopus_params_ja.pv in Resources */ = {isa = PBXBuildFile; fileRef = C757D8DE28A1D08B00F391C8 /* octopus_params_ja.pv */; }; - C757D8E628A1D08B00F391C8 /* octopus_params_es.pv in Resources */ = {isa = PBXBuildFile; fileRef = C757D8DF28A1D08B00F391C8 /* octopus_params_es.pv */; }; - C757D8E728A1D08B00F391C8 /* octopus_params_pt.pv in Resources */ = {isa = PBXBuildFile; fileRef = C757D8E028A1D08B00F391C8 /* octopus_params_pt.pv */; }; - C757D8E828A1D08B00F391C8 /* octopus_params_it.pv in Resources */ = {isa = PBXBuildFile; fileRef = C757D8E128A1D08B00F391C8 /* octopus_params_it.pv */; }; - C757D8E928A1D08B00F391C8 /* octopus_params_de.pv in Resources */ = {isa = PBXBuildFile; fileRef = C757D8E228A1D08B00F391C8 /* octopus_params_de.pv */; }; - C757D8EA28A1D08B00F391C8 /* octopus_params_fr.pv in Resources */ = {isa = PBXBuildFile; fileRef = C757D8E328A1D08B00F391C8 /* octopus_params_fr.pv */; }; + E10B23702CFE741F009CDD3D /* test_resources in Resources */ = {isa = PBXBuildFile; fileRef = E10B236F2CFE741F009CDD3D /* test_resources */; }; E10DF5122CFE60E5008D4AA0 /* Octopus in Frameworks */ = {isa = PBXBuildFile; productRef = E10DF5112CFE60E5008D4AA0 /* Octopus */; }; E10DF5142CFE60E9008D4AA0 /* Octopus in Frameworks */ = {isa = PBXBuildFile; productRef = E10DF5132CFE60E9008D4AA0 /* Octopus */; }; E10DF5162CFE60EC008D4AA0 /* Octopus in Frameworks */ = {isa = PBXBuildFile; productRef = E10DF5152CFE60EC008D4AA0 /* Octopus */; }; @@ -87,6 +73,25 @@ C757D8E128A1D08B00F391C8 /* octopus_params_it.pv */ = {isa = PBXFileReference; lastKnownFileType = file; name = octopus_params_it.pv; path = ../../../../lib/common/param/octopus_params_it.pv; sourceTree = ""; }; C757D8E228A1D08B00F391C8 /* octopus_params_de.pv */ = {isa = PBXFileReference; lastKnownFileType = file; name = octopus_params_de.pv; path = ../../../../lib/common/param/octopus_params_de.pv; sourceTree = ""; }; C757D8E328A1D08B00F391C8 /* octopus_params_fr.pv */ = {isa = PBXFileReference; lastKnownFileType = file; name = octopus_params_fr.pv; path = ../../../../lib/common/param/octopus_params_fr.pv; sourceTree = ""; }; + E10B23592CFE7307009CDD3D /* octopus_params.pv */ = {isa = PBXFileReference; lastKnownFileType = file; name = octopus_params.pv; path = ../../../lib/common/param/octopus_params.pv; sourceTree = ""; }; + E10B235B2CFE73F8009CDD3D /* multiple_keywords.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = multiple_keywords.wav; sourceTree = ""; }; + E10B235C2CFE73F8009CDD3D /* multiple_keywords_de.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = multiple_keywords_de.wav; sourceTree = ""; }; + E10B235D2CFE73F8009CDD3D /* multiple_keywords_es.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = multiple_keywords_es.wav; sourceTree = ""; }; + E10B235E2CFE73F8009CDD3D /* multiple_keywords_fr.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = multiple_keywords_fr.wav; sourceTree = ""; }; + E10B235F2CFE73F8009CDD3D /* multiple_keywords_it.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = multiple_keywords_it.wav; sourceTree = ""; }; + E10B23602CFE73F8009CDD3D /* multiple_keywords_ja.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = multiple_keywords_ja.wav; sourceTree = ""; }; + E10B23612CFE73F8009CDD3D /* multiple_keywords_ko.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = multiple_keywords_ko.wav; sourceTree = ""; }; + E10B23622CFE73F8009CDD3D /* multiple_keywords_pt.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = multiple_keywords_pt.wav; sourceTree = ""; }; + E10B23642CFE73F8009CDD3D /* octopus_params.pv */ = {isa = PBXFileReference; lastKnownFileType = file; path = octopus_params.pv; sourceTree = ""; }; + E10B23652CFE73F8009CDD3D /* octopus_params_de.pv */ = {isa = PBXFileReference; lastKnownFileType = file; path = octopus_params_de.pv; sourceTree = ""; }; + E10B23662CFE73F8009CDD3D /* octopus_params_es.pv */ = {isa = PBXFileReference; lastKnownFileType = file; path = octopus_params_es.pv; sourceTree = ""; }; + E10B23672CFE73F8009CDD3D /* octopus_params_fr.pv */ = {isa = PBXFileReference; lastKnownFileType = file; path = octopus_params_fr.pv; sourceTree = ""; }; + E10B23682CFE73F8009CDD3D /* octopus_params_it.pv */ = {isa = PBXFileReference; lastKnownFileType = file; path = octopus_params_it.pv; sourceTree = ""; }; + E10B23692CFE73F8009CDD3D /* octopus_params_ja.pv */ = {isa = PBXFileReference; lastKnownFileType = file; path = octopus_params_ja.pv; sourceTree = ""; }; + E10B236A2CFE73F8009CDD3D /* octopus_params_ko.pv */ = {isa = PBXFileReference; lastKnownFileType = file; path = octopus_params_ko.pv; sourceTree = ""; }; + E10B236B2CFE73F8009CDD3D /* octopus_params_pt.pv */ = {isa = PBXFileReference; lastKnownFileType = file; path = octopus_params_pt.pv; sourceTree = ""; }; + E10B236D2CFE73F8009CDD3D /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; + E10B236F2CFE741F009CDD3D /* test_resources */ = {isa = PBXFileReference; lastKnownFileType = folder; name = test_resources; path = OctopusAppTestUITests/test_resources; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -121,6 +126,9 @@ 1E0064BB27CEEA65006FF6E9 = { isa = PBXGroup; children = ( + E10B236E2CFE73F8009CDD3D /* test_resources */, + E10B236F2CFE741F009CDD3D /* test_resources */, + E10B23592CFE7307009CDD3D /* octopus_params.pv */, 1E5B7B022800D9A500F8BDDB /* PerformanceTest */, 1E0064C627CEEA65006FF6E9 /* OctopusAppTest */, 1E0064E727CEEA66006FF6E9 /* OctopusAppTestUITests */, @@ -188,6 +196,47 @@ path = PerformanceTest; sourceTree = ""; }; + E10B23632CFE73F8009CDD3D /* audio */ = { + isa = PBXGroup; + children = ( + E10B235B2CFE73F8009CDD3D /* multiple_keywords.wav */, + E10B235C2CFE73F8009CDD3D /* multiple_keywords_de.wav */, + E10B235D2CFE73F8009CDD3D /* multiple_keywords_es.wav */, + E10B235E2CFE73F8009CDD3D /* multiple_keywords_fr.wav */, + E10B235F2CFE73F8009CDD3D /* multiple_keywords_it.wav */, + E10B23602CFE73F8009CDD3D /* multiple_keywords_ja.wav */, + E10B23612CFE73F8009CDD3D /* multiple_keywords_ko.wav */, + E10B23622CFE73F8009CDD3D /* multiple_keywords_pt.wav */, + ); + path = audio; + sourceTree = ""; + }; + E10B236C2CFE73F8009CDD3D /* model_files */ = { + isa = PBXGroup; + children = ( + E10B23642CFE73F8009CDD3D /* octopus_params.pv */, + E10B23652CFE73F8009CDD3D /* octopus_params_de.pv */, + E10B23662CFE73F8009CDD3D /* octopus_params_es.pv */, + E10B23672CFE73F8009CDD3D /* octopus_params_fr.pv */, + E10B23682CFE73F8009CDD3D /* octopus_params_it.pv */, + E10B23692CFE73F8009CDD3D /* octopus_params_ja.pv */, + E10B236A2CFE73F8009CDD3D /* octopus_params_ko.pv */, + E10B236B2CFE73F8009CDD3D /* octopus_params_pt.pv */, + ); + path = model_files; + sourceTree = ""; + }; + E10B236E2CFE73F8009CDD3D /* test_resources */ = { + isa = PBXGroup; + children = ( + E10B23632CFE73F8009CDD3D /* audio */, + E10B236C2CFE73F8009CDD3D /* model_files */, + E10B236D2CFE73F8009CDD3D /* .gitkeep */, + ); + name = test_resources; + path = OctopusAppTestUITests/test_resources; + sourceTree = ""; + }; E10DF5102CFE60E5008D4AA0 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -284,7 +333,7 @@ ); mainGroup = 1E0064BB27CEEA65006FF6E9; packageReferences = ( - E10DF50F2CFE60DE008D4AA0 /* XCLocalSwiftPackageReference "../../../../octopus" */, + E10B23582CFE6CF9009CDD3D /* XCLocalSwiftPackageReference "../../../../octopus" */, ); productRefGroup = 1E0064C527CEEA65006FF6E9 /* Products */; projectDirPath = ""; @@ -312,21 +361,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - C757D8D728A1C85200F391C8 /* multiple_keywords_fr.wav in Resources */, - C757D8D928A1C85200F391C8 /* multiple_keywords_pt.wav in Resources */, - C757D8E528A1D08B00F391C8 /* octopus_params_ja.pv in Resources */, - C757D8E728A1D08B00F391C8 /* octopus_params_pt.pv in Resources */, - C757D8EA28A1D08B00F391C8 /* octopus_params_fr.pv in Resources */, - C757D8D628A1C85200F391C8 /* multiple_keywords_ko.wav in Resources */, - C757D8DB28A1C85200F391C8 /* multiple_keywords_es.wav in Resources */, - C757D8DA28A1C85200F391C8 /* multiple_keywords_ja.wav in Resources */, - C757D8E628A1D08B00F391C8 /* octopus_params_es.pv in Resources */, - 1E00654527CFF101006FF6E9 /* multiple_keywords.wav in Resources */, - C757D8D828A1C85200F391C8 /* multiple_keywords_it.wav in Resources */, - C757D8E428A1D08B00F391C8 /* octopus_params_ko.pv in Resources */, - C757D8DC28A1C85200F391C8 /* multiple_keywords_de.wav in Resources */, - C757D8E928A1D08B00F391C8 /* octopus_params_de.pv in Resources */, - C757D8E828A1D08B00F391C8 /* octopus_params_it.pv in Resources */, + E10B23702CFE741F009CDD3D /* test_resources in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -714,6 +749,10 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ + E10B23582CFE6CF9009CDD3D /* XCLocalSwiftPackageReference "../../../../octopus" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../../../octopus; + }; E10DF50F2CFE60DE008D4AA0 /* XCLocalSwiftPackageReference "../../../../octopus" */ = { isa = XCLocalSwiftPackageReference; relativePath = ../../../../octopus; diff --git a/binding/ios/OctopusAppTest/OctopusAppTestUITests/OctopusAppTestUITests.swift b/binding/ios/OctopusAppTest/OctopusAppTestUITests/OctopusAppTestUITests.swift index b0d08e2..e0eaa24 100644 --- a/binding/ios/OctopusAppTest/OctopusAppTestUITests/OctopusAppTestUITests.swift +++ b/binding/ios/OctopusAppTest/OctopusAppTestUITests/OctopusAppTestUITests.swift @@ -20,7 +20,10 @@ class OctopusAppTestUITests: BaseTest { func testIndexAndSearchFile() throws { let bundle = Bundle(for: type(of: self)) - let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")! + let audioFilePath = bundle.path( + forResource: "multiple_keywords", + ofType: "wav", + inDirectory: "test_resources/audio")! let octopus = try Octopus(accessKey: accessKey) let metadata = try octopus.indexAudioFile(path: audioFilePath) @@ -39,7 +42,10 @@ class OctopusAppTestUITests: BaseTest { func testIndexAndSearchData() throws { let bundle = Bundle(for: type(of: self)) - let fileURL: URL = bundle.url(forResource: "multiple_keywords", withExtension: "wav")! + let fileURL: URL = bundle.url( + forResource: "multiple_keywords", + withExtension: "wav", + subdirectory: "test_resources/audio")! let audioData = try Data(contentsOf: fileURL) var pcm = [Int16](repeating: 0, count: (audioData.count - 44) / 2) _ = pcm.withUnsafeMutableBytes { @@ -63,7 +69,10 @@ class OctopusAppTestUITests: BaseTest { func testMetadataMarshalling() throws { let bundle = Bundle(for: type(of: self)) - let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")! + let audioFilePath = bundle.path( + forResource: "multiple_keywords", + ofType: "wav", + inDirectory: "test_resources/audio")! let octopus = try Octopus(accessKey: accessKey) var metadata: OctopusMetadata? = try octopus.indexAudioFile(path: audioFilePath) @@ -90,7 +99,10 @@ class OctopusAppTestUITests: BaseTest { func testEmptySearchPhrase() throws { let bundle = Bundle(for: type(of: self)) - let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")! + let audioFilePath = bundle.path( + forResource: "multiple_keywords", + ofType: "wav", + inDirectory: "test_resources/audio")! let octopus = try Octopus(accessKey: accessKey) let metadata = try octopus.indexAudioFile(path: audioFilePath) @@ -111,7 +123,10 @@ class OctopusAppTestUITests: BaseTest { func testWhitespaceSearchPhrase() throws { let bundle = Bundle(for: type(of: self)) - let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")! + let audioFilePath = bundle.path( + forResource: "multiple_keywords", + ofType: "wav", + inDirectory: "test_resources/audio")! let octopus = try Octopus(accessKey: accessKey) let metadata = try octopus.indexAudioFile(path: audioFilePath) @@ -132,7 +147,10 @@ class OctopusAppTestUITests: BaseTest { func testNumericSearchPhrase() throws { let bundle = Bundle(for: type(of: self)) - let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")! + let audioFilePath = bundle.path( + forResource: "multiple_keywords", + ofType: "wav", + inDirectory: "test_resources/audio")! let octopus = try Octopus(accessKey: accessKey) let metadata = try octopus.indexAudioFile(path: audioFilePath) @@ -153,7 +171,10 @@ class OctopusAppTestUITests: BaseTest { func testHyphenInSearchPhrase() throws { let bundle = Bundle(for: type(of: self)) - let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")! + let audioFilePath = bundle.path( + forResource: "multiple_keywords", + ofType: "wav", + inDirectory: "test_resources/audio")! let octopus = try Octopus(accessKey: accessKey) let metadata = try octopus.indexAudioFile(path: audioFilePath) @@ -174,7 +195,10 @@ class OctopusAppTestUITests: BaseTest { func testInvalidSearchPhrase() throws { let bundle = Bundle(for: type(of: self)) - let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")! + let audioFilePath = bundle.path( + forResource: "multiple_keywords", + ofType: "wav", + inDirectory: "test_resources/audio")! let octopus = try Octopus(accessKey: accessKey) let metadata = try octopus.indexAudioFile(path: audioFilePath) @@ -195,7 +219,10 @@ class OctopusAppTestUITests: BaseTest { func testSpacesInSearchPhrase() throws { let bundle = Bundle(for: type(of: self)) - let audioFilePath = bundle.path(forResource: "multiple_keywords", ofType: "wav")! + let audioFilePath = bundle.path( + forResource: "multiple_keywords", + ofType: "wav", + inDirectory: "test_resources/audio")! let octopus = try Octopus(accessKey: accessKey) let metadata = try octopus.indexAudioFile(path: audioFilePath) diff --git a/binding/ios/OctopusAppTest/OctopusAppTestUITests/OctopusLanguageTests.swift b/binding/ios/OctopusAppTest/OctopusAppTestUITests/OctopusLanguageTests.swift index a50fadc..55251a3 100644 --- a/binding/ios/OctopusAppTest/OctopusAppTestUITests/OctopusLanguageTests.swift +++ b/binding/ios/OctopusAppTest/OctopusAppTestUITests/OctopusLanguageTests.swift @@ -33,8 +33,16 @@ class OctopusLanguageTests: BaseTest { for testCase in OctopusLanguageTests.testData { let suffix = (testCase[0]) as! String == "en" ? "" : "_\(testCase[0])" - let modelPath = bundle.path(forResource: "octopus_params\(suffix)", ofType: "pv")! - let testAudioPath = bundle.path(forResource: "multiple_keywords\(suffix)", ofType: "wav")! + + let testAudioPath = bundle.path( + forResource: "multiple_keywords\(suffix)", + ofType: "wav", + inDirectory: "test_resources/audio")! + let modelPath = bundle.path( + forResource: "octopus_params\(suffix)", + ofType: "pv", + inDirectory: "test_resources/model_files")! + let expectedResults = testCase[1] as! [String: [[Double]]] try XCTContext.runActivity(named: "(\(testCase[0]))") { _ in diff --git a/binding/ios/OctopusAppTest/OctopusAppTestUITests/test_resources/.gitkeep b/binding/ios/OctopusAppTest/OctopusAppTestUITests/test_resources/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/binding/ios/OctopusAppTest/copy_test_resources.sh b/binding/ios/OctopusAppTest/copy_test_resources.sh new file mode 100755 index 0000000..db09a15 --- /dev/null +++ b/binding/ios/OctopusAppTest/copy_test_resources.sh @@ -0,0 +1,14 @@ +LIB_DIR="../../../lib" +RESOURCE_DIR="../../../res" +ASSETS_DIR="./OctopusAppTestUITests/test_resources" + +echo "Creating test resources asset directory" +mkdir -p ${ASSETS_DIR} + +echo "Copying test audio samples..." +mkdir -p ${ASSETS_DIR}/audio +cp ${RESOURCE_DIR}/audio/*.wav ${ASSETS_DIR}/audio + +echo "Copying test model files..." +mkdir -p ${ASSETS_DIR}/model_files +cp ${LIB_DIR}/common/param/*.pv ${ASSETS_DIR}/model_files \ No newline at end of file