Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load test resources #65

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
print path in CI
  • Loading branch information
thebino committed Nov 17, 2022
commit d5df1e57ffa789128f314d12b9519b4b8424b78c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ import platform.posix.memcpy
actual fun readBinaryResource(resourcePath: String): ByteArray {
val path = resourcePath.substringBeforeLast(".")
val fileType = resourcePath.substringAfterLast(".")
println("resourcePath=$resourcePath, path=$path, fileType=$fileType")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it's just test, probably can remove debug print statements in this file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it for debugging since it is not due to a flaky CI. It is currently not working for iOS / native.
I read there is another gradle task needed to copy the assets into the build directory.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the copy task from the article or a different one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think I haven't added it already.


val absolutePath = NSBundle.mainBundle.pathForResource(path, fileType)
println("absolutePath=$absolutePath")

return NSData.dataWithContentsOfFile(absolutePath!!, NSUTF8StringEncoding, null)!!.toByteArray()
}
Expand Down