webassembly-workflow icon indicating copy to clipboard operation
webassembly-workflow copied to clipboard

cpp testing

Open Ckimchris opened this issue 8 years ago • 5 comments

I wanted to try out your cpp testing and found this command in your package.json. "cpp-tests": "cd ./build && make && cpp-tests", But as soon as it reaches cpp-tests it throws an error saying "sh: cpp-tests: command not found"

Is there something missing in my understanding of the script?

Ckimchris avatar Nov 18 '17 05:11 Ckimchris

If the make bit works, I'm gonna assume everything was set up ok, and you ran the build script first.

This is just a wild guess, but you could try changing it to "./cpp-tests" if not using windows. I've just recreated that error message on Kali, and prefixing with "./" worked.

DanRuta avatar Nov 18 '17 17:11 DanRuta

Hm...I guess I didn't build properly. I'm on OSX like you guessed.

In your build script it is this: "build": "rm -rf build && mkdir build && cd build && cmake -G"MSYS Makefiles" .. && npm install"

I'm running into a problem with cmake -G"MSYS Makefiles" stating: CMake Error: Could not create named generator MSYS Makefiles

do you know what to make of it?

Ckimchris avatar Nov 25 '17 02:11 Ckimchris

Yep. Msys is a Windows tool to emulate a linux environment.

Just tried it out, simply remove the -G"MSYS Makefiles" flag. :)

Maybe I should add a note for non-windows users. Let me know if there was anything else.

DanRuta avatar Nov 25 '17 08:11 DanRuta

Hey Dan, I managed to run the cpp tests successfully. This is what I had to do

  1. npm run build
  2. cd ./build && make ./cpp-tests
  3. then ran npm run cpp-tests adding the ./ in front of the cpp-tests (cd ./build && make && ./cpp-tests)

At least for my OSX environment, these were the steps I needed to take to run the cpp tests successfully.

Thanks for helping me out, I hope this was as helpful as it was to you as it was for me.

Ckimchris avatar Nov 27 '17 00:11 Ckimchris

Great, good to hear! :) And yes, it was.

Good luck with your project.

DanRuta avatar Nov 27 '17 22:11 DanRuta