Cmakefiles missing after code coverage execution - gitlab

I am trying to generate code coverage report using LCOV in Ubuntu platform. I referred
https://github.com/QianYizhou/gtest-cmake-gcov-example
It is working.
I am giving cmake --build ../application/build --target install in my shell script.
After script execution, I can see that the cmakefiles are generated in the build folder.
cd build && make test
cd build && make coverage_TEST_NAME //To check the coverage
I did execute above in my build folder and I generated report.
My problem is, I use this in gitlab pipeline. There is no build folder I can see. So I don't know how to do make coverage_TEST_NAME in my yml file
Generate code generation output in gitlab pipeline.

Problem resolved. Just like in my Ubuntu virtual machine, the application folder was there in my docker image.
I just added a ../application/build command in my yml script, it navigated there.

Related

how do I use autotools with relative directories for GitLab jobs?

I'm trying to use GNU autotools to configure, make, and install a program. I'm running into problems when I configure and make the program inside a GitLab job. It builds without errors, the problem is when I try to run the binary I built in the test jobs it errors out saying the binary doesn't exist because the config file still has the absolute path from the build job? Can I update the config.h without recompiling? I just need to be able to use the binary without errors?

Azure DevOps Pipeline error when running docker-compose up

I have an image that runs the Postman Newman tests collection with an HTML reporter. There is also a pipeline created in Azure DevOps.
Everything used to work fine, but recently the pipeline stopped running docker-compose up, although no changes have been made. Locally, everything continues to work.
Here is my Docker file:
FROM postman/newman:alpine
RUN npm install -g newman-reporter-htmlextra
RUN apk add --update gettext
RUN apk add --update jq
WORKDIR /etc/newman
COPY path/run.sh .
RUN chmod +x run.sh
ENTRYPOINT [ "sh", "path/run.sh" ]
Pipeline crashes with the following message:
ENOENT: no such file or directory, open 'path/run.sh'
Still, the strangest thing for me is that everything used to work, but no changes were made to these files, and now I get an error.
Maybe something was updated in Azure itself, but I didn't find any information about it?
My *.sh file ending with LF
The problem was with the Azure Pipelines YAML file.
I also have a docker-compose.override.yml and adding the additionalDockerComposeFiles parameter with the path to that file solved the problem.
The fact that everything worked before, I think is related to changes in Azure DevOps, although I did not find any detailed information about this.

How does `autoreconf` create m4/ folder?

I hit a problem - and I detected the very strange situation:
I run Docker image locally and run there autoreconf -i and I get correct and robust ./configure script.
Then I run autoreconf -i in the same Docker image but under Gitlab CI. And I get broken ./configure script - some of M4 macro were not substituted to their shell code, so Bash cannot execute them and treats them as syntax errors.
The difference is in m4/ folder in the both runs: successful m4/ folder contains files like:
aria2_arg.m4
ax_check_compile_flag.m4
ax_cxx_compile_stdcxx_11.m4
codeset.m4
fallocate.m4
fcntl-o.m4
gettext.m4
... # and so on
but in the failed (Gitlab CI) m4/ folder there are:
gettext.m4
fcntl-o.m4
# ... and so on
and aria2_arg.m4, ax_check_compile_flag.m4, ax_cxx_compile_stdcxx_11.m4, fallocate.m4 and others are missing. I don't know how is it possible if the Docker image is the same in both cases, but... how does autoreconf create m4/ folder? If its content's source is the Docker image itself (I don't know is it true, it's my suggestion only), then why is the content different in both cases?
No any magic. The missing m4 files do exist in the original Aria2 Github repository (in m4/) folder. autoreconf -i adds another .m4 files to this folder. But it has .gitignore with .m4 rule. I added it to another git repo (to build it in Gitlab) but m4/ folder was ignored. So:
Aria2 -> local folder -> run docker -> OK
Github with m4/ locally m4/ exists
works fine, but:
Aria2 -> another git repo -> run Gitlab CI -> Failure
Github (now no m4/) (.m4 missing)
So, it seems the reason of the problem was - the miss of m4/ in the second git repo (at least I have got the first successful build)

Integrating custom Linux test project package with Alpine

I have downloaded the Linux Test Project repository and compiled it. I now want to integrate it with the Alpine's binary image while compiling. A unix shell script that has Alpine specific commands will kick-in during compile time which adds these packages to the Alpine's binary. All the standard packages (like Python, Nginx and memcached) are getting integrated successfully by this script except LTP. The command used here is apk add <package name>. The same command doesn't work with the custom LTP's binary.
I tried n number of things like upgrading the apk package, supplying the entire LTP repository using --repository option, trying to manually generate an APKBUILD.tar.gz. Nothing works. Any help would be deeply appreciated.
Thanks in advance !

how I can build mozilla projects

I found https://github.com/mozilla/gecko-dev/tree/master/b2g Mozilla repositories where have the moz.build file, can anybody help, how I can build this plugin. What are tools I need use for build project with use moz.build ?
thank you
If you are trying to build B2G (Firefox OS), then you should follow the procedure documented here. But I have to advise you that you're using the wrong repository if that's your objective, since the correct one for B2G should be this.
In any case, you would need to install the build prerequisites for Linux, as described here, by using the following command:
wget -O bootstrap.py https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
Now, if you really wanted to just build the b2g folder in the repository you linked, once you've downloaded and installed the prerequisites, simply issue the following command from the root of gecko-dev:
./mach build b2g
This will invoke mach, the build system Mozilla uses, to build the code in the b2g directory.

Resources