Where is cpp-tests/cpp-tests?

Documentation tells:

Run cpp-tests

cd bin/cpp-tests/
./cpp-tests

But I have different structure. According to documentation I should be in linux-build/, then cd bin/cpp-tests/. So I should be in linux-build/bin/cpp-tests/. I don’t have cpp-tests/ in there.
Is it me having something wrong or documentation ?

This is what I’ve found:

$ find ./ -name cpp-tests
./tests/cpp-tests
./build/linux-build/engine/tests/cpp-tests
$ cd ./build/linux-build/engine/tests/cpp-tests
joe@PC:~/cocos2d-x/build/linux-build/engine/tests/cpp-tests$ ls
CMakeFiles cmake_install.cmake Makefile

Update:
I had problems with running android test project, but after I did what you can see below I was able to run it on android. But there still no cpp-tests/cpp-tests. Should I redownload cocos again and compile it again ?

joe@PC:~/cocos2d-x$ git submodule update --init
Submodule ‘tests/cpp-tests/Resources/ccs-res’ (git://github.com/dumganhar/ccs-res.git) registered for path ‘tests/cpp-tests/Resources/ccs-res’
Submodule ‘tools/bindings-generator’ (git://github.com/cocos2d/bindings-generator.git) registered for path ‘tools/bindings-generator’
Submodule ‘tools/cocos2d-console’ (git://github.com/cocos2d/cocos2d-console.git) registered for path ‘tools/cocos2d-console’
Submodule ‘web’ (git://github.com/cocos2d/cocos2d-html5.git) registered for path ‘web’
Cloning into ‘/home/joe/cocos2d-x/tests/cpp-tests/Resources/ccs-res’…
Cloning into ‘/home/joe/cocos2d-x/tools/bindings-generator’…
Cloning into ‘/home/joe/cocos2d-x/tools/cocos2d-console’…
Cloning into ‘/home/joe/cocos2d-x/web’…
Submodule path ‘tests/cpp-tests/Resources/ccs-res’: checked out ‘5d65db4c5f18c0df1305ff32b076425ab228cc4a’
Submodule path ‘tools/bindings-generator’: checked out ‘2aa9b21f11bf514ca80f243b21750e8c7c28f05e’
Submodule path ‘tools/cocos2d-console’: checked out ‘03d1f8d291ed63439918fa4b180c7b9d698a2bfd’
Submodule path ‘web’: checked out ‘15704c33421bbd236299b6b965e63eb2a6b7172c’

You told me in another thread that you followed the Linux docs completely and you were running. You made it through make ok then?

git submodule update --init and ./download-deps.py are part of that process. Have you done both of these?

cpp-tests is here ~/cocos2d-x/build/linux-build/engine/tests/cpp-tests. Do you have it there? Your screenshot suggests that you do. The Linux process has changed a bit with master in GitHub so I think we should correct the Linux doc for this too.

Edit: I am starting a new pull request here: https://github.com/cocos2d/cocos2d-x-docs/pull/143

In ~/cocos2d-x_prev/build/linux-build/engine/tests/cpp-tests/ I have this:
testsscreenshot

I tried to compile again, but downloaded it from site (not using git) and there was again errors during make. Are those archives different ?
It’s better to put checksums for archive on web-site.

And after cloning from github:

git submodule update --init
fatal: Not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

But I did it after make. And as I remember it was successful.

Currently I compiling cocos again.
It seems I had to use git init command:

joe@PC:~$ git init
Initialized empty Git repository in /home/joe/.git/

1 Like

In documentation you forgot to mention cd ~/cocos2d-x before
./download-deps.py

I didn’t forget cd ~/cocos2d-x:

  sudo apt-get install git

  cd <to where you want to clone this repo>

  git clone https://github.com/cocos2d/cocos2d-x.git

  git submodule update --init

  git submodule update

  ./download-deps.py

you cd the second step, that puts you in cocos2d-x root and you never cd … so you are in your root the whole time.

This is wrong, you are not in your cocos2d-x repo!

You just initialized your ~ as a git repo.

I suspect you didn’t cd here either.

Yes, what you clone from GitHub doesn’t contain everything you need without running the steps mentioned. Downloading the .zip from our website is self contained, except in the case of Linux where you need the steps mentioned in the documentation.

Currently I was making make
Can I just return to git submodule update --init step ?

I see, you mean this:

    cd build
    mkdir linux-build
    cd linux-build
    cmake ../..

Technically you should be still in your cocos2d-x root because the instructions never told you to cd… but I can add a line just to make sure the user is there.

from what location?

Now I initialized it being in ~/cocos2d-x.

If you are cd into ~/cocos2d-x then sure, you can start by doing git submodule update --init

I modified this PR: https://github.com/cocos2d/cocos2d-x-docs/pull/143 to make mention of being in your cocos2d-x root before the linux build process.

I think it should be like this:

sudo apt-get install git

cd <to where you want to clone this repo>

git clone https://github.com/cocos2d/cocos2d-x.git

cd <to cocos2d-x>

git submodule update --init

git submodule update

./download-deps.py

ok. I’ll state this.

1 Like

Content of cpp-tests is still the same.

Could you post what sha256sum of cocos.zip (from site, because it’s already in zip) you getting ?

What are you seeing? Why are you asking for this?