DanRuta / webassembly-workflow

A WebAssembly shell project, set up with task runners, testing and CI+test coverage for both JS and C++
38 stars 11 forks source link

cpp testing #2

Open Ckimchris opened 7 years ago

Ckimchris commented 7 years ago

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?

DanRuta commented 7 years ago

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.

Ckimchris commented 6 years ago

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?

DanRuta commented 6 years ago

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.

Ckimchris commented 6 years ago

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.

DanRuta commented 6 years ago

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

Good luck with your project.