Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iotivity-lite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IoTivity
iotivity-lite
Commits
e50047a2
Commit
e50047a2
authored
Mar 02, 2020
by
Rami Alshafi
Committed by
Kishen Maloor
Mar 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Linux build and skip non-test CI jobs
Signed-off-by:
George Nash
<
george.nash@intel.com
>
parent
8337f369
Pipeline
#429
failed with stage
in 6 minutes and 20 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
55 deletions
+30
-55
.gitlab-ci.yml
.gitlab-ci.yml
+0
-22
api/unittest/coreresourcetest.cpp
api/unittest/coreresourcetest.cpp
+0
-4
port/linux/Makefile
port/linux/Makefile
+8
-4
port/unittest/storagetest.cpp
port/unittest/storagetest.cpp
+22
-25
No files found.
.gitlab-ci.yml
View file @
e50047a2
---
image
:
gcc
Linux_Secured
:
stage
:
build
before_script
:
-
apt update && apt -y install make autoconf
-
set -o pipefail
-
export VERBOSE=false
-
export CCACHE_DISABLE=false
script
:
-
cd port/linux
-
make DYNAMIC=1 IPV4=1 TCP=1 SECURE=1
Linux_Secured_Test
:
stage
:
build
before_script
:
...
...
@@ -23,17 +12,6 @@ Linux_Secured_Test:
-
cd port/linux
-
make DYNAMIC=1 IPV4=1 TCP=1 SECURE=1 test
Linux_Unsecured
:
stage
:
build
before_script
:
-
apt update && apt -y install make autoconf
-
set -o pipefail
-
export VERBOSE=false
-
export CCACHE_DISABLE=false
script
:
-
cd port/linux
-
make DYNAMIC=1 IPV4=1 TCP=1 SECURE=0
Linux_Unsecured_Test
:
stage
:
build
before_script
:
...
...
api/unittest/coreresourcetest.cpp
View file @
e50047a2
...
...
@@ -40,16 +40,12 @@ class TestCoreResource: public testing::Test
virtual
void
SetUp
()
{
oc_core_init
();
#ifndef OC_SECURITY
oc_random_init
();
#endif
/* !OC_SECURITY */
}
virtual
void
TearDown
()
{
oc_core_shutdown
();
#ifndef OC_SECURITY
oc_random_destroy
();
#endif
/* !OC_SECURITY */
}
};
...
...
port/linux/Makefile
View file @
e50047a2
...
...
@@ -207,10 +207,13 @@ CONSTRAINED_LIBS = libiotivity-lite-server.a libiotivity-lite-client.a \
PC
=
iotivity-lite-client.pc iotivity-lite-server.pc
\
iotivity-lite-client-server.pc
all
:
$(CONSTRAINED_LIBS) $(SAMPLES) $(PC) $(SWIG)
all
:
$(CONSTRAINED_LIBS) $(SAMPLES) $(PC) $(
UNIT_TESTS) $(
SWIG)
test
:
$(UNIT_TESTS)
for
test
in
$^
;
do
./
$
${test}
;
done
test
:
all
LD_LIBRARY_PATH
=
./ ./apitest
LD_LIBRARY_PATH
=
./ ./messagingtest
LD_LIBRARY_PATH
=
./ ./platformtest
LD_LIBRARY_PATH
=
./ ./securitytest
.PHONY
:
test clean
...
...
@@ -428,7 +431,8 @@ endif
clean
:
rm
-rf
obj
$(PC)
$(CONSTRAINED_LIBS)
$(API_TEST_OBJ_FILES)
$(SECURITY_TEST_OBJ_FILES)
$(PLATFORM_TEST_OBJ_FILES)
$(MESSAGING_TEST_OBJ_FILES)
$(UNIT_TESTS)
$(STORAGE_TEST_DIR)
$(CLOUD_TEST_OBJ_FILES)
$(RD_CLIENT_TEST_OBJ_FILES)
rm
-rf
pki_certs
rm
-rf
$(API_TEST_OBJ_DIR)
/
*
.gcda
$(SECURITY_TEST_OBJ_DIR)
/
*
.gcda
$(PLATFORM_TEST_OBJ_DIR)
/
*
.gcda
$(MESSAGING_TEST_OBJ_DIR)
/
*
.gcda
rm
-rf
pki_certs smart_home_server_linux_IDD.cbor
cleanall
:
clean
rm
-rf
${all}
$(SAMPLES)
$(TESTS)
${OBT}
${SAMPLES_CREDS}
$(MBEDTLS_PATCH_FILE)
*
.o
...
...
port/unittest/storagetest.cpp
View file @
e50047a2
...
...
@@ -23,7 +23,7 @@
#include <gtest/gtest.h>
extern
"C"
{
#include "port/oc_storage.h"
#include "port/oc_storage.h"
}
#ifdef OC_SECURITY
...
...
@@ -32,50 +32,47 @@ static const char *file_name = "storage_store";
static
uint8_t
buf
[
100
];
#endif
/* OC_SECURITY */
class
TestStorage
:
public
testing
::
Test
{
protected:
virtual
void
SetUp
()
{
}
class
TestStorage
:
public
testing
::
Test
{
protected:
virtual
void
SetUp
()
{}
virtual
void
TearDown
()
{
}
virtual
void
TearDown
()
{}
};
#ifdef OC_SECURITY
TEST_F
(
TestStorage
,
oc_storage_config_fail_with_length_over
)
{
int
ret
=
oc_storage_config
(
"./storage_test_long_size_fail_storage_test_long_size_fail_storage_test_long_size_fail"
);
EXPECT_NE
(
0
,
ret
);
int
ret
=
oc_storage_config
(
"./"
"storage_test_long_size_fail_storage_test_long_"
"size_fail_storage_test_long_size_fail"
);
EXPECT_NE
(
0
,
ret
);
}
TEST_F
(
TestStorage
,
oc_storage_read_fail
)
{
int
ret
=
oc_storage_read
(
file_name
,
buf
,
100
);
EXPECT_NE
(
0
,
ret
);
int
ret
=
oc_storage_read
(
file_name
,
buf
,
100
);
EXPECT_NE
(
0
,
ret
);
}
TEST_F
(
TestStorage
,
oc_storage_write_fail
)
{
int
ret
=
oc_storage_write
(
file_name
,
buf
,
100
);
EXPECT_NE
(
0
,
ret
);
int
ret
=
oc_storage_write
(
file_name
,
buf
,
100
);
EXPECT_NE
(
0
,
ret
);
}
TEST_F
(
TestStorage
,
oc_storage_config
)
{
int
ret
=
oc_storage_config
(
path
);
EXPECT_EQ
(
0
,
ret
);
int
ret
=
oc_storage_config
(
path
);
EXPECT_EQ
(
0
,
ret
);
}
TEST_F
(
TestStorage
,
oc_storage_write
)
{
uint8_t
str
[
100
]
=
"storage"
;
int
ret
=
oc_storage_write
(
file_name
,
str
,
strlen
((
char
*
)
str
));
EXPECT_LE
(
0
,
ret
);
ret
=
oc_storage_read
(
file_name
,
buf
,
100
);
EXPECT_LE
(
0
,
ret
);
EXPECT_STREQ
(
str
,
buf
);
uint8_t
str
[
100
]
=
"storage"
;
int
ret
=
oc_storage_write
(
file_name
,
str
,
strlen
((
char
*
)
str
));
EXPECT_LE
(
0
,
ret
);
ret
=
oc_storage_read
(
file_name
,
buf
,
100
);
EXPECT_LE
(
0
,
ret
);
EXPECT_STREQ
((
const
char
*
)
str
,
(
const
char
*
)
buf
);
}
#endif
/* OC_SECURITY */
\ No newline at end of file
#endif
/* OC_SECURITY */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment