Skip to content

Commit 58cd8ce

Browse files
Vladislav Kaluginladisgin
Vladislav Kalugin
authored andcommitted
Clean files, add --version to CLI, add endlines
1 parent 2426223 commit 58cd8ce

File tree

731 files changed

+532
-3441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

731 files changed

+532
-3441
lines changed

build.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
#!/bin/bash
2-
#
3-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
4-
#
5-
62
set -e
73
set -o pipefail
84
pwd=$PWD

docker/Dockerfile_base

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
#
2-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
#
4-
51
# This is a base dockerfile for UTBot. It's image can be used as a development environment and as a first step in building UTBot, it's release build and integration tests.
62
# This dockerfile installs grpc, cmake, llvm, uclibc, z3. Also it installs such packages as ssh, git, openssh-server, nodejs, python and others.
73
# You need to build this dockerfile inside UnitTestBot/UTBotCpp/docker directory.
84

95
ARG OPERATING_SYSTEM_TAG
106
FROM ubuntu:$OPERATING_SYSTEM_TAG as base_env
11-
LABEL maintainer="Huawei UTBot cloud team"
7+
LABEL maintainer="UnitTestBot"
128
SHELL ["/bin/bash", "--login", "-c"]
139

1410
ENV UTBOT_ALL=/utbot_distr

docker/action-scripts/build-utbot.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
source docker/building_dependencies/runtime_env.sh
84
chmod +x build.sh
95
./build.sh

docker/action-scripts/build-vsix.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
source docker/building_dependencies/runtime_env.sh
84
cd vscode-plugin
95
echo $VERSION

docker/action-scripts/integration-tests.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
source docker/building_dependencies/runtime_env.sh
84
cd vscode-plugin
95

docker/action-scripts/unit-tests.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
source docker/building_dependencies/runtime_env.sh
84
cd server/build
95
chmod +x UTBot_UnitTests

docker/building_dependencies/clean_release.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#
2-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
#
4-
51
# This script clears out all the unnecessary files from the release build
62

73
# Need just clang-10, llvm-cov, llvm-profdata and cmake in $UTBOT_INSTALL_DIR/bin
@@ -38,4 +34,4 @@ rm -rf $UTBOT_ALL/node_modules
3834
# dpkg should remain because it is useful for apt update
3935
mv $UTBOT_ALL/debs-install/usr/share/dpkg ~ && rm -rf $UTBOT_ALL/debs-install/usr/share && mv ~/dpkg $UTBOT_ALL/debs-install/usr/share
4036

41-
rm -rf $UTBOT_INSTALL_DIR/include
37+
rm -rf $UTBOT_INSTALL_DIR/include

docker/building_dependencies/install_packages/debian.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#
2-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
#
4-
51
# This script downloads debian packages.
62
# It installs libc6-dev package (which is dev version of libc) into $UTBOT_ALL/debian-libc-dev-install and other packages into $UTBOT_ALL/debs-install
73

docker/building_dependencies/patches/lit.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/usr/bin/python3
22
# -*- coding: utf-8 -*-
3-
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
63
import os
74
import re
85
import sys
@@ -54,4 +51,4 @@ def execute(self, test, litConfig):
5451
if __name__ == '__main__':
5552
GoogleTest.execute = execute
5653
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
57-
sys.exit(main())
54+
sys.exit(main())

docker/building_dependencies/runtime_env.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#
2-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
#
4-
51
# This script is used to set environment variables inside developer environment
62

73
# Common env

docker/release_distribution_scripts/utbot_online_cli.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
# This script launches cli for UTBot online
84
#arguments: (generate | run) (path to project) (path to snippet)
95

@@ -19,4 +15,4 @@ export CURRENT_FOLDER="$( cd $( dirname ${BASH_SOURCE[0]} ) && pwd )"
1915
RUN_SYSTEM_SCRIPT_PATH=$CURRENT_FOLDER/utbot_run_system.sh
2016
UTBOT_CLI_OPTIONS="$1 --project-path $2 file --file-path $3"
2117
# Launching cli
22-
$RUN_SYSTEM_SCRIPT_PATH "cli" $UTBOT_CLI_OPTIONS
18+
$RUN_SYSTEM_SCRIPT_PATH "cli" $UTBOT_CLI_OPTIONS

docker/release_distribution_scripts/utbot_run_system.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
# This script can launch server, cli and tests
84
#arguments - add MODE (server | cli | test)
95

docker/release_distribution_scripts/utbot_scripts/common_functions.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
# The script provides bash functions that are commonly used in other scripts
84

95
# Common functions
@@ -58,4 +54,4 @@ export -f log
5854
export -f start_process
5955
export -f kill_process
6056
export -f append_to_file
61-
export -f now
57+
export -f now

docker/release_distribution_scripts/utbot_server_restart.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
# This script starts UTBot server
84

95
if [ -z "$1" ]
@@ -40,4 +36,4 @@ export CURRENT_FOLDER="$( cd $( dirname ${BASH_SOURCE[0]} ) && pwd )"
4036
# Get full path a script that launches UTBot
4137
RUN_SYSTEM_SCRIPT_PATH=$CURRENT_FOLDER/utbot_run_system.sh
4238
# Start script that launches UTBot
43-
$RUN_SYSTEM_SCRIPT_PATH "server" $UTBOT_PORT
39+
$RUN_SYSTEM_SCRIPT_PATH "server" $UTBOT_PORT

docker/unpack_and_run_utbot.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/bin/bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
#This script unpacks and runs UTBot server
84
tar -xvf utbot_distr.tar.gz
95
cd utbot_distr
106
chmod +x *.sh
11-
./utbot_server_restart.sh
7+
./utbot_server_restart.sh

docker/utbot_docker_dev.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/usr/bin/env bash
22

3-
#
4-
# Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
5-
#
6-
73
# This script is used to pull base docker image where klee and UTBot can be built.
84

95
CONTAINER_NAME=$USER-utbot-dev

integration-tests/c-example-mini/lib/basic_functions.c

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "basic_functions.h"
62

73
int max_(int a, int b) {

integration-tests/c-example-mini/lib/basic_functions.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#ifndef SIMPLE_TEST_PROJECT_BASIC_FUNCTIONS_H
62
#define SIMPLE_TEST_PROJECT_BASIC_FUNCTIONS_H
73

integration-tests/c-example-mini/lib/main.c

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
static int exit_code(int argc) {
62
if (argc == 1) {
73
return 0;

integration-tests/c-example-mini/lib/module/libfunc.c

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "libfunc.h"
62

73
int libfunc(int a) {

integration-tests/c-example-mini/lib/module/libfunc.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#ifndef SIMPLE_TEST_PROJECT_LIBFUNC_H
62
#define SIMPLE_TEST_PROJECT_LIBFUNC_H
73

integration-tests/c-example-mini/lib/structures/structs/simple_structs.c

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "simple_structs.h"
62

73
int get_sign_struct(struct MyStruct st) {

integration-tests/c-example-mini/lib/structures/structs/simple_structs.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#ifndef SIMPLE_TEST_PROJECT_SIMPLE_STRUCTS_H
62
#define SIMPLE_TEST_PROJECT_SIMPLE_STRUCTS_H
73

integration-tests/c-example-mini/main.c

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "src/simple_calc.h"
62
#include "lib/basic_functions.h"
73

integration-tests/c-example-mini/snippet.c

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
// #include "snippet.h"
62

73
int foo(int a, char c) {

integration-tests/c-example-mini/src/simple_calc.c

-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "simple_calc.h"
62
#include "module/libfunc.h"
73

@@ -17,4 +13,3 @@ int other_module_call(int a) {
1713
return 2;
1814
}
1915
}
20-

integration-tests/c-example-mini/src/simple_calc.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#ifndef CALC_H
62
#define CALC_H
73

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
char *passthrough(__attribute__((align_value(0x8000))) char *x) {
62
return x;
73
}

integration-tests/c-example/lib/array/array-sort.c

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "array-sort.h"
62

73
#define SIZE 4

integration-tests/c-example/lib/array/array-sort.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#ifndef ARRAY_SORT_H
62
#define ARRAY_SORT_H
73

integration-tests/c-example/lib/assertion_failures.c

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "assertion_failures.h"
62

73
int buggy_function1(int a, int b) {

integration-tests/c-example/lib/assertion_failures.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#ifndef SIMPLE_TEST_PROJECT_SRC_ASSERT_FAIL_H
62
#define SIMPLE_TEST_PROJECT_SRC_ASSERT_FAIL_H
73

integration-tests/c-example/lib/basic_functions.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "basic_functions.h"
62

73
int max_(int a, int b) {
@@ -38,4 +34,4 @@ int simple_loop(unsigned int n) {
3834
return 2;
3935
}
4036
return 0;
41-
}
37+
}

integration-tests/c-example/lib/basic_functions.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#ifndef SIMPLE_TEST_PROJECT_BASIC_FUNCTIONS_H
62
#define SIMPLE_TEST_PROJECT_BASIC_FUNCTIONS_H
73

integration-tests/c-example/lib/bits.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "bits.h"
62

73
UINT32 NSE_BITS_CLZ64(UINT64 uiiData)
@@ -37,4 +33,4 @@ UINT32 foo1(const FOO_ATTRIBUTE *attrib, UINT32 num, UINT32 id, UINT32 *offset,
3733
}
3834

3935
return VOS_ERR;
40-
}
36+
}

integration-tests/c-example/lib/bits.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#ifndef UINT64
62
#define UINT64 unsigned long long
73
#endif
@@ -21,4 +17,4 @@ typedef struct tagFOO_ATTRIBUTE {
2117

2218
UINT32 NSE_BITS_CLZ64(UINT64 uiiData);
2319

24-
UINT32 foo1(const FOO_ATTRIBUTE *attrib, UINT32 num, UINT32 id, UINT32 *offset, UINT32 *len);
20+
UINT32 foo1(const FOO_ATTRIBUTE *attrib, UINT32 num, UINT32 id, UINT32 *offset, UINT32 *len);
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/*
2-
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
3-
*/
4-
51
#include "dependent_functions.h"
62

73
int double_max(int a, int b) {
84
return max_(a, b) * 2;
9-
}
5+
}

0 commit comments

Comments
 (0)