Giter Club home page Giter Club logo

ucu_autotests's Introduction

UCU_autotests

The project should collect all tests for UCU robotics lab's subjects and provide one common interface and all related documentation in one place.

Available scripts:

For every script --a help option is available with the complete description, possible options and usage explanation.

test_compilation

test_integral 
test_words_count

Installation

"One script to install it all"

./setup.sh

It creates symlinks to /home/$USER/.local/bin folder, such that all instruments are available from any folder in the system.

Description

Usage

Step-by-step guide

git clone [email protected]:Myralllka/UCU_autotests.git ~/Downloads    # clone the repo to any suitable location
cd UCU_autotests                                                    # 
./system_check.sh                                                   # check if all necessary programs are installed on your local machine
./setup.sh                                                          # install all programs (make symlinks so they are executable from anywhere)

After the setup, test_compilation, test_words_count and test_integral can be used from any folder.

So when a new student's lab is received, what should be done:

  • check the CMakeLists.txt. Currently, test_compilation works if only the CMakeLists.txt is consistent with the template.
  • run the test_compilation in the main lab's folder. It will create multiple executables in the ./bin folder. In case of warnings, consider relaunching the script with the -w option (see test_compilation --help for more details).
  • read the output carefully - if there is PVS output, it will be in those logs.
  • run the student's program with ./bin/run_with... executable files, to check it with sanitizers.
  • after that, if the lab is words count or integral - test it with correspondent test_words_count or test_integral (again, see --help for more details)
  • test the program with valgrind: valgrind --tool=helgrind ./bin/releases [options/config] and valgrind --tool=memcheck --leak-check=full ./bin/release [options/config]
  • then analyze the code and give the feedback

optional

  • To check with the profiler: test the program with perf - perf record --call-graph dwarf ./bin/release [options/config]. Then the hotspot program can visualize perf results: hotspot perf.data

ACS words count default test cases description

Test 0

  • structure:
├── archive
│   ├── file_to_ignore.html
│   └── file.txt
  • words_count_testcases/test_0 contains 0 folders, 0 words. file.txt is empty, file_to_ignore.html has some text that should be ignored. Just the primitive test case to justify if the program even works.

Test 1

  • structure:
├── archive
│   └── 11
│       └── 1
│           ├── 1.txt
│           ├── to_ignore.bin
│           └── to_ignore.html
  • words_count_testcases/test_1 contains one word - is a better test case to test if the program can work with subdirectories and doesn't count the same file more than once.

Test 70

  • structure:
archive
│   ├── 1
│   │   ├── 10.txt
│   │   ├── 1.txt
│   │   ├── 2.txt
│   │   ├── 3.txt
│   │   ├── 4.txt
│   │   ├── 5.txt
│   │   ├── 6.txt
│   │   ├── 7.txt
│   │   ├── 8.txt
│   │   └── 9.txt
│   └── 2
│       ├── 10.txt
│       ├── 1.txt
│       ├── 2.txt
│       ├── 3.txt
│       ├── 4.txt
│       ├── 5.txt
│       ├── 6.txt
│       ├── 7.txt
│       ├── 8.txt
│       └── 9.txt
  • words_count_testcases/test_70 contains in total 70 words: multiple directories, multiple files.

How to add more test cases?

  • create a folder words_count_testcases/test_[something], with only one file archive.zip.
  • create a file, words_count_results/test_[something], with the correctly counted words; see existing files.
  • create a template for a configuration files, words_count_testcases/test_[something].m4, see existing examples.

IMPORTANT

ALL Additional parameters needed for your lab should be specified as environmental variable ADDITIONAL_OPTIONS For example: for a proper work, the additional parameters max_live_tokens and max_queue_size should be set. Before launching the test_words_count, set a variable, for example:

export ADDITIONAL_OPTIONS="max_live_tokens = 16\nmax_queue_size = 1000"

WIP: Digital Ocean server setup for GitHub CI

#!/bin/bash

sudo apt install -y tmux zsh git curl wget libboost-all-dev clang g++ cmake

groupadd wheel
useradd -G wheel -s /bin/bash -m apps
echo "%wheel ALL=(ALL) NOPASSWD: /usr/bin/apt" >> /etc/sudoers

su apps
cd
mkdir GitHubCI
cd !:$
# as written here https://github.com/organizations/ucu-cs/settings/actions/runners/new
mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-x64-2.287.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.287.1/actions-runner-linux-x64-2.287.1.tar.gz
tar xzf ./actions-runner-linux-x64-2.287.1.tar.gz

echo "CONFIGURE THE SELF-HOSTED RUNNER ACCORDING TO GITHUB CONFIGURE RECOMMENDATIONS."

ucu_autotests's People

Contributors

myralllka avatar redn1nja avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.