View libpldm (including oem) test on Big Endian system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Environment to be set in Jenkins | |
# BIG_ENDIAN_SYSTEM_IP=<IP> | |
# USER=<USER> (setup by ssh-copy-id) | |
#!/bin/bash | |
set -xe | |
BRANCH_LOCAL=local_test | |
TMP_LOCAL_REPO=/tmp/test_pldm | |
rm -rf ${TMP_LOCAL_REPO} |
View test_on_bmc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put the binaries on BMC | |
### Test test_sdbusplus_emit_object | |
root@romulus:/tmp# ./test_sdbusplus_emit_object& | |
[1] 445 | |
### By default, the object has 4 interfaces | |
root@romulus:/tmp# busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetObject sas /xyz/openbmc_project/leiyu 0 | |
a{sas} 1 "xyz.openbmc_project.LeiYu.Test" 4 "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.ObjectManager" "org.freedesktop.DBus.Peer" "org.freedesktop.DBus.Properties" |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=g++ | |
#CC=clang++ | |
CFLAGS=-c -Wall -fpic | |
BUGFLAG=-DBUG | |
SOURCES=main.cpp bar.cpp | |
all: main | |
main: main.o libbar.so | |
$(CC) -o main main.o -ldl |
View download_youku_to_aac.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Depends: | |
# you-get | |
# ffmpeg | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 <url>" | |
exit 1 | |
fi |
View upload_and_update.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Usage: upload_and_update.py <--file tarball> | |
<--tftp user@tftp-ip:/path/to/tftproot> | |
[--password SSH-PASSWORD-TO-TFTP] | |
--bmc <bmc-ip> | |
[-v] | |
This scripts copies OpenBMC tarball to TFTP server, | |
and uses REST APIs to update the tarball to BMC. |
View testEventManager.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "message.hpp" | |
#include <gtest/gtest.h> | |
namespace { | |
static uint8_t p[] ={0x3, 0x32, 0x34, 0x36}; | |
constexpr auto eventspath = "./events"; | |
event_record_t build_event_record( | |
const char* message, | |
const char* severity, |
View gist:70da43f6799efb9277c12172c65f8940
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APK is pulled from Nexus6p and dumped with `aapt dump permissions base.apk` | |
package: com.eg.android.AlipayGphone | |
uses-permission: name='com.alipay.permission.ALIPAY_UPDATE_CREDENTIALS' | |
uses-permission: name='com.android.launcher.permission.INSTALL_SHORTCUT' | |
uses-permission: name='android.permission.BLUETOOTH' | |
uses-permission: name='android.permission.CHANGE_WIFI_STATE' | |
uses-permission: name='android.permission.CAMERA' | |
uses-permission: name='android.permission.ACCESS_NETWORK_STATE' | |
uses-permission: name='android.permission.MODIFY_AUDIO_SETTINGS' |
View main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import requests | |
from datetime import datetime | |
from twython import Twython |
View Example_2_so_loading_1_a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the sample code for dynamic libraries loadling a static library, the behavior could be different with different compile/link options and dlopen() options. |